From: Dmitry Torokhov Date: Fri, 16 Dec 2016 05:36:09 +0000 (-0800) Subject: Merge branch 'synaptics-rmi4' into next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ebfb0184ef560897fad35005989e82433419202c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'synaptics-rmi4' into next Merge updated Synaptics RMI4 support, including support for SMBus controllers and flashing firmware. --- ebfb0184ef560897fad35005989e82433419202c diff --cc drivers/input/rmi4/rmi_i2c.c index 1ebc2c1debae,64a548822da4..082306d7c207 --- a/drivers/input/rmi4/rmi_i2c.c +++ b/drivers/input/rmi4/rmi_i2c.c @@@ -315,16 -254,7 +275,12 @@@ static int rmi_i2c_probe(struct i2c_cli client->addr); return retval; } + retval = devm_add_action_or_reset(&client->dev, + rmi_i2c_unregister_transport, + rmi_i2c); + if (retval) + return retval; - retval = rmi_i2c_init_irq(client); - if (retval < 0) - return retval; - dev_info(&client->dev, "registered rmi i2c driver at %#04x.\n", client->addr); return 0; diff --cc drivers/input/rmi4/rmi_spi.c index 4ebef607e214,f3e9e488635c..69548d7d1f10 --- a/drivers/input/rmi4/rmi_spi.c +++ b/drivers/input/rmi4/rmi_spi.c @@@ -471,16 -425,7 +432,12 @@@ static int rmi_spi_probe(struct spi_dev dev_err(&spi->dev, "failed to register transport.\n"); return retval; } + retval = devm_add_action_or_reset(&spi->dev, + rmi_spi_unregister_transport, + rmi_spi); + if (retval) + return retval; - retval = rmi_spi_init_irq(spi); - if (retval < 0) - return retval; - dev_info(&spi->dev, "registered RMI SPI driver\n"); return 0; }