* [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP
@ 2015-02-18 10:47 Geert Uytterhoeven
2015-02-18 11:20 ` Karol Wrona
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-02-18 10:47 UTC (permalink / raw)
To: Karol Wrona, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald
Cc: linux-iio, linux-kernel, Geert Uytterhoeven
If CONFIG_PM_SLEEP=n:
drivers/iio/common/ssp_sensors/ssp_dev.c:644: warning: ‘ssp_suspend’ defined but not used
drivers/iio/common/ssp_sensors/ssp_dev.c:669: warning: ‘ssp_resume’ defined but not used
Protect the unused functions by #ifdef CONFIG_PM_SLEEP to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/iio/common/ssp_sensors/ssp_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
index 52d70435f5a11c55..55a90082a29bd484 100644
--- a/drivers/iio/common/ssp_sensors/ssp_dev.c
+++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
@@ -640,6 +640,7 @@ static int ssp_remove(struct spi_device *spi)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
static int ssp_suspend(struct device *dev)
{
int ret;
@@ -688,6 +689,7 @@ static int ssp_resume(struct device *dev)
return 0;
}
+#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops ssp_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(ssp_suspend, ssp_resume)
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP
2015-02-18 10:47 [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP Geert Uytterhoeven
@ 2015-02-18 11:20 ` Karol Wrona
2015-02-18 11:40 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Karol Wrona @ 2015-02-18 11:20 UTC (permalink / raw)
To: Geert Uytterhoeven, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald
Cc: linux-iio, linux-kernel
On 02/18/2015 11:47 AM, Geert Uytterhoeven wrote:
> If CONFIG_PM_SLEEP=n:
>
> drivers/iio/common/ssp_sensors/ssp_dev.c:644: warning: ‘ssp_suspend’ defined but not used
> drivers/iio/common/ssp_sensors/ssp_dev.c:669: warning: ‘ssp_resume’ defined but not used
>
> Protect the unused functions by #ifdef CONFIG_PM_SLEEP to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/iio/common/ssp_sensors/ssp_dev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
> index 52d70435f5a11c55..55a90082a29bd484 100644
> --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
> +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
> @@ -640,6 +640,7 @@ static int ssp_remove(struct spi_device *spi)
> return 0;
> }
>
> +#ifdef CONFIG_PM_SLEEP
> static int ssp_suspend(struct device *dev)
> {
> int ret;
> @@ -688,6 +689,7 @@ static int ssp_resume(struct device *dev)
>
> return 0;
> }
> +#endif /* CONFIG_PM_SLEEP */
>
> static const struct dev_pm_ops ssp_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(ssp_suspend, ssp_resume)
>
Patch is ok but commit title points to different driver. Irina would be
surprised and confused to see it on the list and log.
Please, use something like that: iio: common: ssp_sensors: Fix warnings ...
Thanks,
Karol
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP
2015-02-18 11:20 ` Karol Wrona
@ 2015-02-18 11:40 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-02-18 11:40 UTC (permalink / raw)
To: Karol Wrona
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, linux-iio, linux-kernel@vger.kernel.org
On Wed, Feb 18, 2015 at 12:20 PM, Karol Wrona <k.wrona@samsung.com> wrote:
> Patch is ok but commit title points to different driver. Irina would be
> surprised and confused to see it on the list and log.
Woops, that was a serious copy-and-paste bug on my side. Sorry for that.
> Please, use something like that: iio: common: ssp_sensors: Fix warnings ...
Resent with corrected subject.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-18 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 10:47 [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP Geert Uytterhoeven
2015-02-18 11:20 ` Karol Wrona
2015-02-18 11:40 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox