Commit 0570bab0 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: bu21013_ts - annotate supend/resume methods as __maybe_unused

Instead if #ifdef-ing out suspend and resume methods, let's mark
them as __maybe_unused to get better compile time coverage.
Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a866781e
...@@ -634,7 +634,6 @@ static int bu21013_remove(struct i2c_client *client) ...@@ -634,7 +634,6 @@ static int bu21013_remove(struct i2c_client *client)
return 0; return 0;
} }
#ifdef CONFIG_PM
/** /**
* bu21013_suspend() - suspend the touch screen controller * bu21013_suspend() - suspend the touch screen controller
* @dev: pointer to device structure * @dev: pointer to device structure
...@@ -642,7 +641,7 @@ static int bu21013_remove(struct i2c_client *client) ...@@ -642,7 +641,7 @@ static int bu21013_remove(struct i2c_client *client)
* This function is used to suspend the * This function is used to suspend the
* touch panel controller and returns integer * touch panel controller and returns integer
*/ */
static int bu21013_suspend(struct device *dev) static int __maybe_unused bu21013_suspend(struct device *dev)
{ {
struct bu21013_ts *ts = dev_get_drvdata(dev); struct bu21013_ts *ts = dev_get_drvdata(dev);
struct i2c_client *client = ts->client; struct i2c_client *client = ts->client;
...@@ -665,7 +664,7 @@ static int bu21013_suspend(struct device *dev) ...@@ -665,7 +664,7 @@ static int bu21013_suspend(struct device *dev)
* This function is used to resume the touch panel * This function is used to resume the touch panel
* controller and returns integer. * controller and returns integer.
*/ */
static int bu21013_resume(struct device *dev) static int __maybe_unused bu21013_resume(struct device *dev)
{ {
struct bu21013_ts *ts = dev_get_drvdata(dev); struct bu21013_ts *ts = dev_get_drvdata(dev);
struct i2c_client *client = ts->client; struct i2c_client *client = ts->client;
...@@ -693,11 +692,7 @@ static int bu21013_resume(struct device *dev) ...@@ -693,11 +692,7 @@ static int bu21013_resume(struct device *dev)
return 0; return 0;
} }
static const struct dev_pm_ops bu21013_dev_pm_ops = { static SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume);
.suspend = bu21013_suspend,
.resume = bu21013_resume,
};
#endif
static const struct i2c_device_id bu21013_id[] = { static const struct i2c_device_id bu21013_id[] = {
{ DRIVER_TP, 0 }, { DRIVER_TP, 0 },
...@@ -708,9 +703,7 @@ MODULE_DEVICE_TABLE(i2c, bu21013_id); ...@@ -708,9 +703,7 @@ MODULE_DEVICE_TABLE(i2c, bu21013_id);
static struct i2c_driver bu21013_driver = { static struct i2c_driver bu21013_driver = {
.driver = { .driver = {
.name = DRIVER_TP, .name = DRIVER_TP,
#ifdef CONFIG_PM
.pm = &bu21013_dev_pm_ops, .pm = &bu21013_dev_pm_ops,
#endif
}, },
.probe = bu21013_probe, .probe = bu21013_probe,
.remove = bu21013_remove, .remove = bu21013_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment