--- zzzz-none-000/linux-3.10.107/drivers/input/misc/kxtj9.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/input/misc/kxtj9.c 2021-02-04 17:41:59.000000000 +0000 @@ -509,7 +509,8 @@ static int kxtj9_probe(struct i2c_client *client, const struct i2c_device_id *id) { - const struct kxtj9_platform_data *pdata = client->dev.platform_data; + const struct kxtj9_platform_data *pdata = + dev_get_platdata(&client->dev); struct kxtj9_data *tj9; int err; @@ -614,8 +615,7 @@ return 0; } -#ifdef CONFIG_PM_SLEEP -static int kxtj9_suspend(struct device *dev) +static int __maybe_unused kxtj9_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct kxtj9_data *tj9 = i2c_get_clientdata(client); @@ -630,12 +630,11 @@ return 0; } -static int kxtj9_resume(struct device *dev) +static int __maybe_unused kxtj9_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct kxtj9_data *tj9 = i2c_get_clientdata(client); struct input_dev *input_dev = tj9->input_dev; - int retval = 0; mutex_lock(&input_dev->mutex); @@ -643,9 +642,8 @@ kxtj9_enable(tj9); mutex_unlock(&input_dev->mutex); - return retval; + return 0; } -#endif static SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume); @@ -659,7 +657,6 @@ static struct i2c_driver kxtj9_driver = { .driver = { .name = NAME, - .owner = THIS_MODULE, .pm = &kxtj9_pm_ops, }, .probe = kxtj9_probe,