linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: accel: kxcjk-1013: Fix defined but unused warning
@ 2014-09-03 15:13 Daniel Baluta
  2014-09-14 17:34 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Baluta @ 2014-09-03 15:13 UTC (permalink / raw)
  To: jic23; +Cc: pmeerw, srinivas.pandruvada, daniel.baluta, linux-iio,
	linux-kernel

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 <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
---
 drivers/iio/accel/kxcjk-1013.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index 736231d..eb1b8b6 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -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)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: accel: kxcjk-1013: Fix defined but unused warning
  2014-09-03 15:13 [PATCH] iio: accel: kxcjk-1013: Fix defined but unused warning Daniel Baluta
@ 2014-09-14 17:34 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2014-09-14 17:34 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: pmeerw, srinivas.pandruvada, linux-iio, linux-kernel

On 03/09/14 16:13, Daniel Baluta wrote:
> 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 <srinivas.pandruvada@linux.intel.com>
> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
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
> ---
>  drivers/iio/accel/kxcjk-1013.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 736231d..eb1b8b6 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -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)
>  {
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-14 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 15:13 [PATCH] iio: accel: kxcjk-1013: Fix defined but unused warning Daniel Baluta
2014-09-14 17:34 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).