On Fri, Aug 02, 2013 at 01:38:02PM -0700, Zoran Markovic wrote:
> This patch, originally authored by Arve Hjonnevag and Todd Poynor,
> prevents the system from entering suspend mode until the power
> supply plug, unplug, or any other change of state event is fully
> processed. This guarantees that the screen lights up and displays
> the battery charging state. The implementation uses the power
> supply wakeup_source object.
> 
> Cc: Anton Vorontsov <an...@enomsg.org>
> Cc: David Woodhouse <dw...@infradead.org>
> Cc: Arve Hjonnevag <a...@android.com>
> Cc: Todd Poynor <toddpoy...@google.com>
> Cc: John Stultz <john.stu...@linaro.org>
> Signed-off-by: Zoran Markovic <zoran.marko...@linaro.org>
> ---
...
> +             kobject_uevent(&psy->dev->kobj, KOBJ_CHANGE);
> +             spin_lock_irqsave(&psy->changed_lock, flags);
> +     }
> +     /* dependent power supplies (e.g. battery) may have changed

Multi-line comments style issue...

> +      * state as a result of this event, so poll again and hold
> +      * the wakeup_source until all events are processed.
> +      */
> +     if (!psy->changed)
> +             pm_relax(psy->dev);
...
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 804b906..253d412 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -194,6 +194,8 @@ struct power_supply {
>       /* private */
>       struct device *dev;
>       struct work_struct changed_work;
> +     spinlock_t changed_lock;

#include <linux/spinlock.h> is needed.

I fixed it up and applied the patch, thanks a lot!

Anton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to