aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-04-07 14:43:10 -0400
committerLee Jones <lee.jones@linaro.org>2016-04-19 02:56:35 -0400
commite253fb0472e7a892176c7a65cef61a6aa75f8d2e (patch)
tree717ab1136a22550a45be84eee842da5f64ad1400 /drivers/mfd
parent69633beaebf345cde6672a9ac7679c88fc0c3245 (diff)
mfd: stw481x: Use devm_mfd_add_devices() for mfd_device registration
Use devm_mfd_add_devices() for MFD devices registration and get rid of .remove callback to remove MFD child-devices. This is done by managed device framework. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/stw481x.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/mfd/stw481x.c b/drivers/mfd/stw481x.c
index ca613df36143..ab949eaca6ad 100644
--- a/drivers/mfd/stw481x.c
+++ b/drivers/mfd/stw481x.c
@@ -206,8 +206,8 @@ static int stw481x_probe(struct i2c_client *client,
206 stw481x_cells[i].pdata_size = sizeof(*stw481x); 206 stw481x_cells[i].pdata_size = sizeof(*stw481x);
207 } 207 }
208 208
209 ret = mfd_add_devices(&client->dev, 0, stw481x_cells, 209 ret = devm_mfd_add_devices(&client->dev, 0, stw481x_cells,
210 ARRAY_SIZE(stw481x_cells), NULL, 0, NULL); 210 ARRAY_SIZE(stw481x_cells), NULL, 0, NULL);
211 if (ret) 211 if (ret)
212 return ret; 212 return ret;
213 213
@@ -216,12 +216,6 @@ static int stw481x_probe(struct i2c_client *client,
216 return ret; 216 return ret;
217} 217}
218 218
219static int stw481x_remove(struct i2c_client *client)
220{
221 mfd_remove_devices(&client->dev);
222 return 0;
223}
224
225/* 219/*
226 * This ID table is completely unused, as this is a pure 220 * This ID table is completely unused, as this is a pure
227 * device-tree probed driver, but it has to be here due to 221 * device-tree probed driver, but it has to be here due to
@@ -246,7 +240,6 @@ static struct i2c_driver stw481x_driver = {
246 .of_match_table = stw481x_match, 240 .of_match_table = stw481x_match,
247 }, 241 },
248 .probe = stw481x_probe, 242 .probe = stw481x_probe,
249 .remove = stw481x_remove,
250 .id_table = stw481x_id, 243 .id_table = stw481x_id,
251}; 244};
252 245