Re: [greybus-dev] [PATCH 1/8] driver core: Add helper for accessing Power Management callbacs

2020-05-26 Thread Krzysztof Wilczyński
Hello Alex and Greg, [...] > This could just be: > > if (drv) > return drv->pm; > > return NULL; > > Or if you want to evoke passion in Greg: > > return drv ? drv->pm : NULL; > > -Alex > > > I hate ? : lines with a passion

Re: [greybus-dev] [PATCH 1/8] driver core: Add helper for accessing Power Management callbacs

2020-05-26 Thread Alex Elder
On 5/26/20 1:33 AM, Greg Kroah-Hartman wrote: On Mon, May 25, 2020 at 06:26:01PM +, Krzysztof Wilczyński wrote: Add driver_to_pm() helper allowing for accessing the Power Management callbacs for a particular device. Access to the callbacs (struct dev_pm_ops) is normally done through using t

Re: [PATCH 1/8] driver core: Add helper for accessing Power Management callbacs

2020-05-25 Thread Greg Kroah-Hartman
On Mon, May 25, 2020 at 06:26:01PM +, Krzysztof Wilczyński wrote: > Add driver_to_pm() helper allowing for accessing the Power Management > callbacs for a particular device. Access to the callbacs (struct > dev_pm_ops) is normally done through using the pm pointer that is > embedded within the

[PATCH 1/8] driver core: Add helper for accessing Power Management callbacs

2020-05-25 Thread Krzysztof Wilczyński
Add driver_to_pm() helper allowing for accessing the Power Management callbacs for a particular device. Access to the callbacs (struct dev_pm_ops) is normally done through using the pm pointer that is embedded within the device_driver struct. Helper allows for the code required to reference the p