--- zzzz-none-000/linux-3.10.107/drivers/input/touchscreen/ili210x.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/input/touchscreen/ili210x.c 2021-02-04 17:41:59.000000000 +0000 @@ -169,7 +169,7 @@ return count; } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); +static DEVICE_ATTR(calibrate, 0644, NULL, ili210x_calibrate); static struct attribute *ili210x_attributes[] = { &dev_attr_calibrate.attr, @@ -184,7 +184,7 @@ const struct i2c_device_id *id) { struct device *dev = &client->dev; - const struct ili210x_platform_data *pdata = dev->platform_data; + const struct ili210x_platform_data *pdata = dev_get_platdata(dev); struct ili210x *priv; struct input_dev *input; struct panel_info panel; @@ -216,7 +216,7 @@ /* get panel info */ error = ili210x_read_reg(client, REG_PANEL_INFO, &panel, sizeof(panel)); if (error) { - dev_err(dev, "Failed to get panel informations, err: %d\n", + dev_err(dev, "Failed to get panel information, err: %d\n", error); return error; } @@ -276,7 +276,7 @@ error = input_register_device(priv->input); if (error) { - dev_err(dev, "Cannot regiser input device, err: %d\n", error); + dev_err(dev, "Cannot register input device, err: %d\n", error); goto err_remove_sysfs; } @@ -311,8 +311,7 @@ return 0; } -#ifdef CONFIG_PM_SLEEP -static int ili210x_i2c_suspend(struct device *dev) +static int __maybe_unused ili210x_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -322,7 +321,7 @@ return 0; } -static int ili210x_i2c_resume(struct device *dev) +static int __maybe_unused ili210x_i2c_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -331,7 +330,6 @@ return 0; } -#endif static SIMPLE_DEV_PM_OPS(ili210x_i2c_pm, ili210x_i2c_suspend, ili210x_i2c_resume); @@ -345,7 +343,6 @@ static struct i2c_driver ili210x_ts_driver = { .driver = { .name = "ili210x_i2c", - .owner = THIS_MODULE, .pm = &ili210x_i2c_pm, }, .id_table = ili210x_i2c_id,