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

2012-08-19 Thread Rafael J. Wysocki
On Sunday, August 19, 2012, Greg Kroah-Hartman wrote: > On Sat, Aug 18, 2012 at 10:49:06PM +0200, Rafael J. Wysocki wrote: > > On Saturday, August 18, 2012, Rafael J. Wysocki wrote: > > > On Saturday, August 18, 2012, Ming Lei wrote: > > > > On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki wrote

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

2012-08-18 Thread Greg Kroah-Hartman
On Sat, Aug 18, 2012 at 10:49:06PM +0200, Rafael J. Wysocki wrote: > On Saturday, August 18, 2012, Rafael J. Wysocki wrote: > > On Saturday, August 18, 2012, Ming Lei wrote: > > > On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki wrote: > > > > > > > > My question was about the number of current

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

2012-08-18 Thread Rafael J. Wysocki
On Saturday, August 18, 2012, Rafael J. Wysocki wrote: > On Saturday, August 18, 2012, Ming Lei wrote: > > On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki wrote: > > > > > > My question was about the number of current users of it. Sorry for not > > > being clear. > > > > Sorry for misundersta

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

2012-08-18 Thread Rafael J. Wysocki
On Saturday, August 18, 2012, Ming Lei wrote: > On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki wrote: > > > > My question was about the number of current users of it. Sorry for not > > being clear. > > Sorry for misunderstanding your question. > > > > > If there are no more anticipated user

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

2012-08-18 Thread Ming Lei
On Sat, Aug 18, 2012 at 9:38 PM, Rafael J. Wysocki wrote: > > My question was about the number of current users of it. Sorry for not > being clear. Sorry for misunderstanding your question. > > If there are no more anticipated users than the current only one, please > drop the unused (void *) a

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

2012-08-18 Thread Rafael J. Wysocki
On Saturday, August 18, 2012, Ming Lei wrote: > On Sat, Aug 18, 2012 at 6:02 AM, Rafael J. Wysocki wrote: > > On Friday, August 17, 2012, Ming Lei wrote: > >> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *)) > > > > Is this function actually used more than once? > > At leas

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

2012-08-17 Thread Ming Lei
On Sat, Aug 18, 2012 at 6:02 AM, Rafael J. Wysocki wrote: > On Friday, August 17, 2012, Ming Lei wrote: >> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *)) > > Is this function actually used more than once? At least now, it is called each time before system sleep. Thanks,

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

2012-08-17 Thread Rafael J. Wysocki
On Friday, August 17, 2012, Ming Lei wrote: > dpm_list and its pm lock provide a good way to iterate all > devices in system. Except this way, there is no other easy > way to iterate devices in system. > > firmware loader need to cache firmware images for devices > before system sleep, so introduc

[PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-17 Thread Ming Lei
dpm_list and its pm lock provide a good way to iterate all devices in system. Except this way, there is no other easy way to iterate devices in system. firmware loader need to cache firmware images for devices before system sleep, so introduce the function to meet its demand. Reported-by: Fenggua