]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hid-sensors: avoid unused function warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Aug 2016 15:29:35 +0000 (17:29 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 29 Aug 2016 18:54:08 +0000 (19:54 +0100)
commit902e23f99053805d159765c066e6a821d2e04603
tree2358d5be881e3b95ab431a1afda525a4604cab97
parent97208099e55609ba2bc90d5aede6926555ceb855
iio: hid-sensors: avoid unused function warning

A small rework of the PM code in this driver introduced a harmless
warning when CONFIG_PM_SLEEP is not set:

drivers/iio/common/hid-sensors/hid-sensor-trigger.c:212:12: error: 'hid_sensor_resume' defined but not used [-Werror=unused-function]

This removes the #ifdef and instead marks all three PM functions
as __maybe_unused, which covers all possible cases and is harder
to get wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e4a5bae8b9a9 ("iio: hid-sensors: use asynchronous resume")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/hid-sensors/hid-sensor-trigger.c