Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373673
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 14/20] mfd: rt5033: Use devm_mfd_add_devices() for mfd_device registration |
| Date | 2016-04-07 21:00 +0200 |
| Message-ID | <rlnjS-8fc-53@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: Ingi Kim <ingi2.kim@samsung.com>
CC: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
Changes from V1:
- Convert mfd to MFD.
- Run checkpatch with --strict option and fix warning.
- Collected reviewed by.
drivers/mfd/rt5033.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/mfd/rt5033.c b/drivers/mfd/rt5033.c
index 2b95485..9bd089c 100644
--- a/drivers/mfd/rt5033.c
+++ b/drivers/mfd/rt5033.c
@@ -97,9 +97,9 @@ static int rt5033_i2c_probe(struct i2c_client *i2c,
return ret;
}
- ret = mfd_add_devices(rt5033->dev, -1, rt5033_devs,
- ARRAY_SIZE(rt5033_devs), NULL, 0,
- regmap_irq_get_domain(rt5033->irq_data));
+ ret = devm_mfd_add_devices(rt5033->dev, -1, rt5033_devs,
+ ARRAY_SIZE(rt5033_devs), NULL, 0,
+ regmap_irq_get_domain(rt5033->irq_data));
if (ret < 0) {
dev_err(&i2c->dev, "Failed to add RT5033 child devices.\n");
return ret;
@@ -110,13 +110,6 @@ static int rt5033_i2c_probe(struct i2c_client *i2c,
return 0;
}
-static int rt5033_i2c_remove(struct i2c_client *i2c)
-{
- mfd_remove_devices(&i2c->dev);
-
- return 0;
-}
-
static const struct i2c_device_id rt5033_i2c_id[] = {
{ "rt5033", },
{ }
@@ -135,7 +128,6 @@ static struct i2c_driver rt5033_driver = {
.of_match_table = of_match_ptr(rt5033_dt_match),
},
.probe = rt5033_i2c_probe,
- .remove = rt5033_i2c_remove,
.id_table = rt5033_i2c_id,
};
module_i2c_driver(rt5033_driver);
--
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