PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set
This patch (as1124) fixes a couple of bugs in the PM core. The new dev->power.status field should be initialized regardless of whether CONFIG_PM_SLEEP is enabled, and similarly dpm_sysfs_add() should be called whenever CONFIG_PM is enabled. The patch separates out the call to dpm_sysfs_add() from the call to device_pm_add(). As a result device_pm_add() can no longer return an error, so its return type is changed to void. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Tested-by: NRomit Dasgupta <romit@ti.com> Acked-by: NRafael J. Wysocki <rjw@sisk.pl> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Showing
想要评论请 注册 或 登录