]> git.baikalelectronics.ru Git - kernel.git/commit
misc: apds9802als: Fix suspend/resume
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 11 Apr 2013 09:24:39 +0000 (11:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:39:02 +0000 (12:39 -0700)
commit4a07f806fd2171dec6bd8da444c1822eedfda989
treeebe40d8459363ae6692ef73ce6bf2f6f4f8abf0a
parentfcdb48bc9b71db8b75e1b30f6b61a3dec6f3c8a3
misc: apds9802als: Fix suspend/resume

The apds9802als driver implements runtime pm and at the same time uses the
legacy pm callbacks for suspend and resume. This does not work since the i2c
core wont look at the legacy pm callbacks if a driver has the 'pm' field set.
This patch fixes it by moving over to dev_pm_ops for suspend/resume as well.
Since both runtime pm and suspend/resume behave the same way this can easily be
done using the UNIVERSAL_DEV_PM_OPS macro.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Hong Liu <hong.liu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/apds9802als.c