Re: [RFC PATCH 2/3] PM / Sleep: introduce dpm_for_each_dev

From: Ming Lei
Date: Thu Aug 16 2012 - 21:54:52 EST


On Fri, Aug 17, 2012 at 9:45 AM, Ming Lei <ming.lei@xxxxxxxxxxxxx> wrote:
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index 44d1f23..bf86f89 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -640,6 +640,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
> } while (0)
>
> extern int device_pm_wait_for_dev(struct device *sub, struct device *dev);
> +extern void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *));
>
> extern int pm_generic_prepare(struct device *dev);
> extern int pm_generic_suspend_late(struct device *dev);
> @@ -679,6 +680,10 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b)
> return 0;
> }
>
> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *))

Sorry, the above line is wrong, and should be defined as 'static inline'.
Please drop this one and take the attachment patch.


Thanks,
--
Ming Lei

Attachment: 0002-PM-Sleep-introduce-dpm_for_each_dev.patch
Description: Binary data