hwmon: (pmbus) Simplify remove functions
Since devm_kzalloc() is now used to allocate driver memory, the client driver remove function has no purpose other than to call pmbus_do_remove(). This means we can get rid of it by redefining pmbus_do_remove() to use the same prototype, and pointing to it directly. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:

committed by
Guenter Roeck

parent
8b313ca7f1
commit
dd285ad737
@@ -180,12 +180,6 @@ static int max8688_probe(struct i2c_client *client,
|
||||
return pmbus_do_probe(client, id, &max8688_info);
|
||||
}
|
||||
|
||||
static int max8688_remove(struct i2c_client *client)
|
||||
{
|
||||
pmbus_do_remove(client);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id max8688_id[] = {
|
||||
{"max8688", 0},
|
||||
{ }
|
||||
@@ -199,7 +193,7 @@ static struct i2c_driver max8688_driver = {
|
||||
.name = "max8688",
|
||||
},
|
||||
.probe = max8688_probe,
|
||||
.remove = max8688_remove,
|
||||
.remove = pmbus_do_remove,
|
||||
.id_table = max8688_id,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user