--- zzzz-none-000/linux-3.10.107/drivers/input/misc/gp2ap002a00f.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/input/misc/gp2ap002a00f.c 2021-02-04 17:41:59.000000000 +0000 @@ -125,7 +125,7 @@ static int gp2a_probe(struct i2c_client *client, const struct i2c_device_id *id) { - const struct gp2a_platform_data *pdata = client->dev.platform_data; + const struct gp2a_platform_data *pdata = dev_get_platdata(&client->dev); struct gp2a_data *dt; int error; @@ -225,8 +225,7 @@ return 0; } -#ifdef CONFIG_PM_SLEEP -static int gp2a_suspend(struct device *dev) +static int __maybe_unused gp2a_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct gp2a_data *dt = i2c_get_clientdata(client); @@ -244,7 +243,7 @@ return retval; } -static int gp2a_resume(struct device *dev) +static int __maybe_unused gp2a_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct gp2a_data *dt = i2c_get_clientdata(client); @@ -261,7 +260,6 @@ return retval; } -#endif static SIMPLE_DEV_PM_OPS(gp2a_pm, gp2a_suspend, gp2a_resume); @@ -269,11 +267,11 @@ { GP2A_I2C_NAME, 0 }, { } }; +MODULE_DEVICE_TABLE(i2c, gp2a_i2c_id); static struct i2c_driver gp2a_i2c_driver = { .driver = { .name = GP2A_I2C_NAME, - .owner = THIS_MODULE, .pm = &gp2a_pm, }, .probe = gp2a_probe,