On 01/09/2014 02:25 PM, Dmitry Torokhov wrote:
Input: synaptics-rmi4 - fix disabling gpio config in i2c transport From: Dmitry Torokhov<dmitry.torokhov@xxxxxxxxx> We need to pass into pdata->gpio_config() gpio_data which is already a pointer, and not its address. Signed-off-by: Dmitry Torokhov<dmitry.torokhov@xxxxxxxxx> --- drivers/input/rmi4/rmi_i2c.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c index ebe74ec..12aea8c 100644 --- a/drivers/input/rmi4/rmi_i2c.c +++ b/drivers/input/rmi4/rmi_i2c.c @@ -168,7 +168,8 @@ exit: static int rmi_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { - const struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev); + const struct rmi_device_platform_data *pdata = + dev_get_platdata(&client->dev); struct rmi_transport_dev *xport; struct rmi_i2c_data *data; int retval; @@ -250,12 +251,13 @@ err_gpio: static int rmi_i2c_remove(struct i2c_client *client) { struct rmi_transport_dev *xport = i2c_get_clientdata(client); - struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev); + const struct rmi_device_platform_data *pdata = + dev_get_platdata(&client->dev); rmi_unregister_transport_device(xport); if (pdata->gpio_config) - pdata->gpio_config(&pdata->gpio_data, false); + pdata->gpio_config(pdata->gpio_data, false); return 0; }
It's just plain freaky that no problem ever arose from that, but definitely it's a bug.
Acked-by: Christopher Heiny <cheiny@xxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html