Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97a652a8 authored by Jingoo Han's avatar Jingoo Han Committed by Dmitry Torokhov
Browse files

Input: misc - use __maybe_unused instead of ifdef around suspend/resume



Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 6bdd2fd1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -112,8 +112,7 @@ static int pm860x_onkey_probe(struct platform_device *pdev)
	return 0;
}

#ifdef CONFIG_PM_SLEEP
static int pm860x_onkey_suspend(struct device *dev)
static int __maybe_unused pm860x_onkey_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
@@ -122,7 +121,7 @@ static int pm860x_onkey_suspend(struct device *dev)
		chip->wakeup_flag |= 1 << PM8607_IRQ_ONKEY;
	return 0;
}
static int pm860x_onkey_resume(struct device *dev)
static int __maybe_unused pm860x_onkey_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
@@ -131,7 +130,6 @@ static int pm860x_onkey_resume(struct device *dev)
		chip->wakeup_flag &= ~(1 << PM8607_IRQ_ONKEY);
	return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey_resume);

+2 −4
Original line number Diff line number Diff line
@@ -13,17 +13,15 @@
#include <linux/pm.h>
#include "ad714x.h"

#ifdef CONFIG_PM_SLEEP
static int ad714x_i2c_suspend(struct device *dev)
static int __maybe_unused ad714x_i2c_suspend(struct device *dev)
{
	return ad714x_disable(i2c_get_clientdata(to_i2c_client(dev)));
}

static int ad714x_i2c_resume(struct device *dev)
static int __maybe_unused ad714x_i2c_resume(struct device *dev)
{
	return ad714x_enable(i2c_get_clientdata(to_i2c_client(dev)));
}
#endif

static SIMPLE_DEV_PM_OPS(ad714x_i2c_pm, ad714x_i2c_suspend, ad714x_i2c_resume);

+2 −4
Original line number Diff line number Diff line
@@ -16,17 +16,15 @@
#define AD714x_SPI_CMD_PREFIX      0xE000   /* bits 15:11 */
#define AD714x_SPI_READ            BIT(10)

#ifdef CONFIG_PM_SLEEP
static int ad714x_spi_suspend(struct device *dev)
static int __maybe_unused ad714x_spi_suspend(struct device *dev)
{
	return ad714x_disable(spi_get_drvdata(to_spi_device(dev)));
}

static int ad714x_spi_resume(struct device *dev)
static int __maybe_unused ad714x_spi_resume(struct device *dev)
{
	return ad714x_enable(spi_get_drvdata(to_spi_device(dev)));
}
#endif

static SIMPLE_DEV_PM_OPS(ad714x_spi_pm, ad714x_spi_suspend, ad714x_spi_resume);

+2 −4
Original line number Diff line number Diff line
@@ -105,8 +105,7 @@ static int adxl34x_i2c_remove(struct i2c_client *client)
	return adxl34x_remove(ac);
}

#ifdef CONFIG_PM_SLEEP
static int adxl34x_i2c_suspend(struct device *dev)
static int __maybe_unused adxl34x_i2c_suspend(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
	struct adxl34x *ac = i2c_get_clientdata(client);
@@ -116,7 +115,7 @@ static int adxl34x_i2c_suspend(struct device *dev)
	return 0;
}

static int adxl34x_i2c_resume(struct device *dev)
static int __maybe_unused adxl34x_i2c_resume(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
	struct adxl34x *ac = i2c_get_clientdata(client);
@@ -125,7 +124,6 @@ static int adxl34x_i2c_resume(struct device *dev)

	return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(adxl34x_i2c_pm, adxl34x_i2c_suspend,
			 adxl34x_i2c_resume);
+2 −4
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ static int adxl34x_spi_remove(struct spi_device *spi)
	return adxl34x_remove(ac);
}

#ifdef CONFIG_PM_SLEEP
static int adxl34x_spi_suspend(struct device *dev)
static int __maybe_unused adxl34x_spi_suspend(struct device *dev)
{
	struct spi_device *spi = to_spi_device(dev);
	struct adxl34x *ac = spi_get_drvdata(spi);
@@ -105,7 +104,7 @@ static int adxl34x_spi_suspend(struct device *dev)
	return 0;
}

static int adxl34x_spi_resume(struct device *dev)
static int __maybe_unused adxl34x_spi_resume(struct device *dev)
{
	struct spi_device *spi = to_spi_device(dev);
	struct adxl34x *ac = spi_get_drvdata(spi);
@@ -114,7 +113,6 @@ static int adxl34x_spi_resume(struct device *dev)

	return 0;
}
#endif

static SIMPLE_DEV_PM_OPS(adxl34x_spi_pm, adxl34x_spi_suspend,
			 adxl34x_spi_resume);
Loading