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

Commit 02b6a58b authored by Jingoo Han's avatar Jingoo Han Committed by Dmitry Torokhov
Browse files

Input: touchscreen - 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 572081a4
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -820,8 +820,7 @@ static int ad7877_remove(struct spi_device *spi)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused ad7877_suspend(struct device *dev)
static int ad7877_suspend(struct device *dev)
{
{
	struct ad7877 *ts = dev_get_drvdata(dev);
	struct ad7877 *ts = dev_get_drvdata(dev);


@@ -830,7 +829,7 @@ static int ad7877_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int ad7877_resume(struct device *dev)
static int __maybe_unused ad7877_resume(struct device *dev)
{
{
	struct ad7877 *ts = dev_get_drvdata(dev);
	struct ad7877 *ts = dev_get_drvdata(dev);


@@ -838,7 +837,6 @@ static int ad7877_resume(struct device *dev)


	return 0;
	return 0;
}
}
#endif


static SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume);
static SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume);


+2 −4
Original line number Original line Diff line number Diff line
@@ -284,8 +284,7 @@ static void ad7879_close(struct input_dev* input)
		__ad7879_disable(ts);
		__ad7879_disable(ts);
}
}


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused ad7879_suspend(struct device *dev)
static int ad7879_suspend(struct device *dev)
{
{
	struct ad7879 *ts = dev_get_drvdata(dev);
	struct ad7879 *ts = dev_get_drvdata(dev);


@@ -301,7 +300,7 @@ static int ad7879_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int ad7879_resume(struct device *dev)
static int __maybe_unused ad7879_resume(struct device *dev)
{
{
	struct ad7879 *ts = dev_get_drvdata(dev);
	struct ad7879 *ts = dev_get_drvdata(dev);


@@ -316,7 +315,6 @@ static int ad7879_resume(struct device *dev)


	return 0;
	return 0;
}
}
#endif


SIMPLE_DEV_PM_OPS(ad7879_pm_ops, ad7879_suspend, ad7879_resume);
SIMPLE_DEV_PM_OPS(ad7879_pm_ops, ad7879_suspend, ad7879_resume);
EXPORT_SYMBOL(ad7879_pm_ops);
EXPORT_SYMBOL(ad7879_pm_ops);
+2 −4
Original line number Original line Diff line number Diff line
@@ -883,8 +883,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle)
	return IRQ_HANDLED;
	return IRQ_HANDLED;
}
}


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused ads7846_suspend(struct device *dev)
static int ads7846_suspend(struct device *dev)
{
{
	struct ads7846 *ts = dev_get_drvdata(dev);
	struct ads7846 *ts = dev_get_drvdata(dev);


@@ -906,7 +905,7 @@ static int ads7846_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int ads7846_resume(struct device *dev)
static int __maybe_unused ads7846_resume(struct device *dev)
{
{
	struct ads7846 *ts = dev_get_drvdata(dev);
	struct ads7846 *ts = dev_get_drvdata(dev);


@@ -927,7 +926,6 @@ static int ads7846_resume(struct device *dev)


	return 0;
	return 0;
}
}
#endif


static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume);
static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume);


+2 −4
Original line number Original line Diff line number Diff line
@@ -2244,8 +2244,7 @@ static int mxt_remove(struct i2c_client *client)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused mxt_suspend(struct device *dev)
static int mxt_suspend(struct device *dev)
{
{
	struct i2c_client *client = to_i2c_client(dev);
	struct i2c_client *client = to_i2c_client(dev);
	struct mxt_data *data = i2c_get_clientdata(client);
	struct mxt_data *data = i2c_get_clientdata(client);
@@ -2261,7 +2260,7 @@ static int mxt_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int mxt_resume(struct device *dev)
static int __maybe_unused mxt_resume(struct device *dev)
{
{
	struct i2c_client *client = to_i2c_client(dev);
	struct i2c_client *client = to_i2c_client(dev);
	struct mxt_data *data = i2c_get_clientdata(client);
	struct mxt_data *data = i2c_get_clientdata(client);
@@ -2276,7 +2275,6 @@ static int mxt_resume(struct device *dev)


	return 0;
	return 0;
}
}
#endif


static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume);
static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume);


+2 −4
Original line number Original line Diff line number Diff line
@@ -417,8 +417,7 @@ static void auo_pixcir_input_close(struct input_dev *dev)
	return;
	return;
}
}


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused auo_pixcir_suspend(struct device *dev)
static int auo_pixcir_suspend(struct device *dev)
{
{
	struct i2c_client *client = to_i2c_client(dev);
	struct i2c_client *client = to_i2c_client(dev);
	struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
	struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
@@ -450,7 +449,7 @@ unlock:
	return ret;
	return ret;
}
}


static int auo_pixcir_resume(struct device *dev)
static int __maybe_unused auo_pixcir_resume(struct device *dev)
{
{
	struct i2c_client *client = to_i2c_client(dev);
	struct i2c_client *client = to_i2c_client(dev);
	struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
	struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
@@ -479,7 +478,6 @@ unlock:


	return ret;
	return ret;
}
}
#endif


static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops,
static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops,
			 auo_pixcir_suspend, auo_pixcir_resume);
			 auo_pixcir_suspend, auo_pixcir_resume);
Loading