Re: [PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-18 Thread Dan Carpenter
Hi Nicolin, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Nicolin-Chen/hwmon-ina3221-Implement-PM-runtime-to-save-power/20181018-010754 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next smatch

Re: [PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-17 Thread Nicolin Chen
On Wed, Oct 17, 2018 at 12:44:30PM -0700, Guenter Roeck wrote: > > + hdev->driver = dev->driver; > > + hdev->power = dev->power; > > + hdev->pm_domain = dev->pm_domain; > > dev can, unfortunately, be NULL > > > hdev->of_node = dev ? dev->of_node : NULL; > > ... as you can see here.

Re: [PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-17 Thread Guenter Roeck
On Tue, Oct 16, 2018 at 06:24:22PM -0700, Nicolin Chen wrote: > The new hdev is a child device related to the original parent > hwmon driver and its device. However, it doesn't support the > power features, typically being defined in the parent driver. > > So this patch inherits three necessary

[PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-16 Thread Nicolin Chen
The new hdev is a child device related to the original parent hwmon driver and its device. However, it doesn't support the power features, typically being defined in the parent driver. So this patch inherits three necessary power properties from the parent dev to hdev: power, pm_domain and driver