Skip to content

Commit

Permalink
iio: common: ssp_sensors: Protect PM-only functions to kill warning
Browse files Browse the repository at this point in the history
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>
Acked-by: Karol Wrona <k.wrona@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Geert Uytterhoeven authored and Jonathan Cameron committed Feb 22, 2015
1 parent 49e19d5 commit b841118
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/common/ssp_sensors/ssp_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b841118

Please sign in to comment.