diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-08 15:53:43 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-09-02 09:06:53 -0700 |
commit | 0570bab054106f68533dcb0de2e64c48b15d7b9f (patch) | |
tree | e39523379fc22e9b49d2aed8f26eb3c840b86adc /drivers/input | |
parent | a866781e84dd022dde5d307093555e65c31277de (diff) |
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: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/bu21013_ts.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c index e9cb020ed725..0bdadd24296f 100644 --- a/drivers/input/touchscreen/bu21013_ts.c +++ b/drivers/input/touchscreen/bu21013_ts.c @@ -634,7 +634,6 @@ static int bu21013_remove(struct i2c_client *client) return 0; } -#ifdef CONFIG_PM /** * bu21013_suspend() - suspend the touch screen controller * @dev: pointer to device structure @@ -642,7 +641,7 @@ static int bu21013_remove(struct i2c_client *client) * This function is used to suspend the * 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 i2c_client *client = ts->client; @@ -665,7 +664,7 @@ static int bu21013_suspend(struct device *dev) * This function is used to resume the touch panel * 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 i2c_client *client = ts->client; @@ -693,11 +692,7 @@ static int bu21013_resume(struct device *dev) return 0; } -static const struct dev_pm_ops bu21013_dev_pm_ops = { - .suspend = bu21013_suspend, - .resume = bu21013_resume, -}; -#endif +static SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume); static const struct i2c_device_id bu21013_id[] = { { DRIVER_TP, 0 }, @@ -708,9 +703,7 @@ MODULE_DEVICE_TABLE(i2c, bu21013_id); static struct i2c_driver bu21013_driver = { .driver = { .name = DRIVER_TP, -#ifdef CONFIG_PM .pm = &bu21013_dev_pm_ops, -#endif }, .probe = bu21013_probe, .remove = bu21013_remove, |