Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373675
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 15/20] mfd: sky81452: Use devm_mfd_add_devices() for mfd_device registration |
| Date | 2016-04-07 21:00 +0200 |
| Message-ID | <rlnjS-8fc-55@gated-at.bofh.it> (permalink) |
| References | <rlnjQ-8fc-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
CC: Gyungoh Yoo <jack.yoo@skyworksinc.com>
---
Changes from V1:
- Convert mfd to MFD.
- Run checkpatch with --strict option and fix warning.
drivers/mfd/sky81452.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/mfd/sky81452.c b/drivers/mfd/sky81452.c
index b0c9b04..30a2a67 100644
--- a/drivers/mfd/sky81452.c
+++ b/drivers/mfd/sky81452.c
@@ -64,19 +64,14 @@ static int sky81452_probe(struct i2c_client *client,
cells[1].platform_data = pdata->regulator_init_data;
cells[1].pdata_size = sizeof(*pdata->regulator_init_data);
- ret = mfd_add_devices(dev, -1, cells, ARRAY_SIZE(cells), NULL, 0, NULL);
+ ret = devm_mfd_add_devices(dev, -1, cells, ARRAY_SIZE(cells),
+ NULL, 0, NULL);
if (ret)
dev_err(dev, "failed to add child devices. err=%d\n", ret);
return ret;
}
-static int sky81452_remove(struct i2c_client *client)
-{
- mfd_remove_devices(&client->dev);
- return 0;
-}
-
static const struct i2c_device_id sky81452_ids[] = {
{ "sky81452" },
{ }
@@ -97,7 +92,6 @@ static struct i2c_driver sky81452_driver = {
.of_match_table = of_match_ptr(sky81452_of_match),
},
.probe = sky81452_probe,
- .remove = sky81452_remove,
.id_table = sky81452_ids,
};
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 00/20] mfd: Add devm_ apis for mfd_add_devices and mfd_release_devices Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 17/20] mfd: tps6507x: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 01/20] mfd: Add resource managed apis for mfd_add_devices Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
Re: [PATCH V2 01/20] mfd: Add resource managed apis for mfd_add_devices Lee Jones <lee.jones@linaro.org> - 2016-04-11 11:20 +0200
[PATCH V2 18/20] mfd: tps65217: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 13/20] mfd: rn5t618: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 20/20] mfd: wm8400: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 08/20] mfd: lp3943: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 10/20] mfd: mt6397: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 19/20] mfd: tps65910: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 05/20] mfd: atmel-hlcdc: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 14/20] mfd: rt5033: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 11/20] mfd: rdc321x: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 15/20] mfd: sky81452: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 03/20] mfd: act8945a: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 16/20] mfd: stw481x: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 12/20] mfd: rk808: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:00 +0200
[PATCH V2 04/20] mfd: as3711: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:10 +0200
[PATCH V2 02/20] mfd: Add devm_mfd_add_devices() in list of managed interfaces Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-07 21:10 +0200
csiph-web