aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/ad714x-i2c.c
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-09-12 11:08:34 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-09-19 11:42:39 -0700
commitc5c18a06af753eab1162fcdfb1cf03581e70b3f4 (patch)
tree7243da6644d37bff5cf4e856cfd0f47934500fd3 /drivers/input/misc/ad714x-i2c.c
parentInput: imx_keypad - remove obsolete comment (diff)
downloadlinux-dev-c5c18a06af753eab1162fcdfb1cf03581e70b3f4.tar.xz
linux-dev-c5c18a06af753eab1162fcdfb1cf03581e70b3f4.zip
Input: ad714x - convert to using managed resources
Use managed resource functions devm_request_threaded_irq, devm_inpute_allocate_device and devm_kzalloc to simplify error handling. Also, remove use of input_unregister_device as input_register_device itself handles it and works as resource managed function. To be compatible with the change, various gotos are replaced with direct returns, and unneeded labels are dropped. With these changes remove ad714x_remove and corresponding calls of it as they are now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/ad714x-i2c.c')
-rw-r--r--drivers/input/misc/ad714x-i2c.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/input/misc/ad714x-i2c.c b/drivers/input/misc/ad714x-i2c.c
index 189bdc8e91a5..2f047738bc0b 100644
--- a/drivers/input/misc/ad714x-i2c.c
+++ b/drivers/input/misc/ad714x-i2c.c
@@ -85,15 +85,6 @@ static int ad714x_i2c_probe(struct i2c_client *client,
return 0;
}
-static int ad714x_i2c_remove(struct i2c_client *client)
-{
- struct ad714x_chip *chip = i2c_get_clientdata(client);
-
- ad714x_remove(chip);
-
- return 0;
-}
-
static const struct i2c_device_id ad714x_id[] = {
{ "ad7142_captouch", 0 },
{ "ad7143_captouch", 0 },
@@ -110,7 +101,6 @@ static struct i2c_driver ad714x_i2c_driver = {
.pm = &ad714x_i2c_pm,
},
.probe = ad714x_i2c_probe,
- .remove = ad714x_i2c_remove,
.id_table = ad714x_id,
};