aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-04-07 14:43:05 -0400
committerLee Jones <lee.jones@linaro.org>2016-04-19 02:55:52 -0400
commit7360544c2b91d5689b635b2117f5e85986cf529b (patch)
treea6b0971cf0f51476ea4df3fd112c2fe9db8f2afc /drivers/mfd
parent08e380a53a92a445bdfd98e09680237bf0c269aa (diff)
mfd: rdc321x: 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. CC: Florian Fainelli <florian@openwrt.org> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/rdc321x-southbridge.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c
index 6575585f1d1f..2bd8c5b6d600 100644
--- a/drivers/mfd/rdc321x-southbridge.c
+++ b/drivers/mfd/rdc321x-southbridge.c
@@ -85,14 +85,10 @@ static int rdc321x_sb_probe(struct pci_dev *pdev,
85 rdc321x_gpio_pdata.sb_pdev = pdev; 85 rdc321x_gpio_pdata.sb_pdev = pdev;
86 rdc321x_wdt_pdata.sb_pdev = pdev; 86 rdc321x_wdt_pdata.sb_pdev = pdev;
87 87
88 return mfd_add_devices(&pdev->dev, -1, 88 return devm_mfd_add_devices(&pdev->dev, -1,
89 rdc321x_sb_cells, ARRAY_SIZE(rdc321x_sb_cells), 89 rdc321x_sb_cells,
90 NULL, 0, NULL); 90 ARRAY_SIZE(rdc321x_sb_cells),
91} 91 NULL, 0, NULL);
92
93static void rdc321x_sb_remove(struct pci_dev *pdev)
94{
95 mfd_remove_devices(&pdev->dev);
96} 92}
97 93
98static const struct pci_device_id rdc321x_sb_table[] = { 94static const struct pci_device_id rdc321x_sb_table[] = {
@@ -105,7 +101,6 @@ static struct pci_driver rdc321x_sb_driver = {
105 .name = "RDC321x Southbridge", 101 .name = "RDC321x Southbridge",
106 .id_table = rdc321x_sb_table, 102 .id_table = rdc321x_sb_table,
107 .probe = rdc321x_sb_probe, 103 .probe = rdc321x_sb_probe,
108 .remove = rdc321x_sb_remove,
109}; 104};
110 105
111module_pci_driver(rdc321x_sb_driver); 106module_pci_driver(rdc321x_sb_driver);