iio: accel: kxcjk-1013: Fix defined but unused warning
PATCH 1/1 iio: accel: kxcjk-1013: Fix defined but unused warning
Noticed when compiling with CONFIG_PM_RUNTIME not set:kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function]
Introduced by commit 124e1b1d (iio: accel: kxcjk-1013: support runtime pm).
Reviewed-by Srinivas Pandruvada <[email protected]>
Signed-off-by Daniel Baluta <[email protected]>
--- drivers/iio/accel/kxcjk-1013.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/iio/accel/kxcjk-1013.c +2 -0
@@ -307,6 +307,7 @@ static int kxcjk1013_chip_init(struct kxcjk1013_data *data)return 0 ; } +#ifdef CONFIG_PM_RUNTIME static int kxcjk1013_get_startup_times (struct kxcjk1013_data *data) {int i;
@@ -318,6 +319,7 @@ static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data) return KXCJK1013_MAX_STARTUP_TIME_US; } +#endif static int kxcjk1013_set_power_state (struct kxcjk1013_data *data,bool on) {
Signature · 1 line
1.9.1
Jonathan Cameron
maintainerQuoted 7 lines · Daniel Baluta
Noticed when compiling with
CONFIG_PM_RUNTIMEnot set:kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function]Introduced by commit
124e1b1d(iio: accel: kxcjk-1013: support runtime pm).Reviewed-by Srinivas Pandruvada <[email protected]>Signed-off-by Daniel Baluta <[email protected]>
Note, convention is author first in this list then reviewers etc then sign offs from those handling the patch.
Applied to the togreg branch of iio.git - initially pushed out as testing.
Thanks,
J
Quoted 25 lines
--- drivers/iio/accel/kxcjk-1013.c | 2 ++ 1 file changed, 2 insertions(+)drivers/iio/accel/kxcjk-1013.c +2
-0@@ -307,6 +307,7 @@ static int kxcjk1013_chip_init(struct kxcjk1013_data *data)return 0 ; } +#ifdef CONFIG_PM_RUNTIME static int kxcjk1013_get_startup_times (struct kxcjk1013_data *data) {int i;@@ -318,6 +319,7 @@ static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data) return KXCJK1013_MAX_STARTUP_TIME_US; } +#endif static int kxcjk1013_set_power_state (struct kxcjk1013_data *data,bool on) {