diff options
| author | Chun Zhang <chunz@codeaurora.org> | 2014-01-31 13:41:37 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-21 21:11:58 -0700 |
| commit | af3203fa14b9c7fac5fe5d93bc10d84ceb693438 (patch) | |
| tree | 4e281b1fade6bcbc5d8b23a971db91a5c4bf873c /drivers/input | |
| parent | 13954554dc40a65d3ee7c8155193a1bfd5ef7b6d (diff) | |
input: ft5x06: add support when CONFIG_PM is not defined
When CONFIG_PM is not defined, there are some compilation errors,
because it introduces undeclared touch suspend and resume function.
This patch is propagated from 3.18 kernel
'commit a144428c6e02 ("input: ft5x06: add support when CONFIG_PM
is not defined")'
Change-Id: I869bd41270ea240c671e5478126a61d4ff2088dc
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/touchscreen/ft5x06_ts.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/input/touchscreen/ft5x06_ts.c b/drivers/input/touchscreen/ft5x06_ts.c index 1719ae2bd5a7..4d046f690a57 100644 --- a/drivers/input/touchscreen/ft5x06_ts.c +++ b/drivers/input/touchscreen/ft5x06_ts.c @@ -578,6 +578,26 @@ static int ft5x06_ts_resume(struct device *dev) return 0; } +static const struct dev_pm_ops ft5x06_ts_pm_ops = { +#if (!defined(CONFIG_FB) && !defined(CONFIG_HAS_EARLYSUSPEND)) + .suspend = ft5x06_ts_suspend, + .resume = ft5x06_ts_resume, +#endif +}; + +#else +static int ft5x06_ts_suspend(struct device *dev) +{ + return 0; +} + +static int ft5x06_ts_resume(struct device *dev) +{ + return 0; +} + +#endif + #if defined(CONFIG_FB) static int fb_notifier_callback(struct notifier_block *self, unsigned long event, void *data) @@ -618,14 +638,6 @@ static void ft5x06_ts_late_resume(struct early_suspend *handler) } #endif -static const struct dev_pm_ops ft5x06_ts_pm_ops = { -#if (!defined(CONFIG_FB) && !defined(CONFIG_HAS_EARLYSUSPEND)) - .suspend = ft5x06_ts_suspend, - .resume = ft5x06_ts_resume, -#endif -}; -#endif - static int ft5x06_auto_cal(struct i2c_client *client) { struct ft5x06_ts_data *data = i2c_get_clientdata(client); @@ -885,7 +897,7 @@ static int ft5x06_fw_upgrade(struct device *dev, bool force) } if (fw->size < FT_FW_MIN_SIZE || fw->size > FT_FW_MAX_SIZE) { - dev_err(dev, "Invalid firmware size (%d)\n", fw->size); + dev_err(dev, "Invalid firmware size (%zu)\n", fw->size); rc = -EIO; goto rel_fw; } |
