Input: ad7879 - use more devm interfaces
gpiochip_add now has a managed version, and we can remove sysfs attribute group via devm_add_action_or_reset (at least until we have devm version of sysfs_create_group). This allows us to get rid of ad7879_remove(). Reviewed-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
@@ -45,17 +45,6 @@ static int ad7879_i2c_probe(struct i2c_client *client,
|
||||
if (IS_ERR(ts))
|
||||
return PTR_ERR(ts);
|
||||
|
||||
i2c_set_clientdata(client, ts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ad7879_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct ad7879 *ts = i2c_get_clientdata(client);
|
||||
|
||||
ad7879_remove(ts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -81,7 +70,6 @@ static struct i2c_driver ad7879_i2c_driver = {
|
||||
.of_match_table = of_match_ptr(ad7879_i2c_dt_ids),
|
||||
},
|
||||
.probe = ad7879_i2c_probe,
|
||||
.remove = ad7879_i2c_remove,
|
||||
.id_table = ad7879_id,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user