Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1371456

[PATCH 11/20] mfd: rdc321x: Use devm_mfd_add_devices() for mfd_device registration

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject [PATCH 11/20] mfd: rdc321x: Use devm_mfd_add_devices() for mfd_device registration
Date 2016-04-05 14:10 +0200
Message-ID <rkxXX-36a-11@gated-at.bofh.it> (permalink)
References <rkxOi-2K6-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use devm_mfd_add_devices() for mfd devices registration and get
rid of .remove callback to remove mfd devices. This is done
by managed device framework.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Florian Fainelli <florian@openwrt.org>
---
 drivers/mfd/rdc321x-southbridge.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/mfd/rdc321x-southbridge.c b/drivers/mfd/rdc321x-southbridge.c
index 6575585..3ddb644 100644
--- a/drivers/mfd/rdc321x-southbridge.c
+++ b/drivers/mfd/rdc321x-southbridge.c
@@ -85,16 +85,11 @@ static int rdc321x_sb_probe(struct pci_dev *pdev,
 	rdc321x_gpio_pdata.sb_pdev = pdev;
 	rdc321x_wdt_pdata.sb_pdev = pdev;
 
-	return mfd_add_devices(&pdev->dev, -1,
+	return devm_mfd_add_devices(&pdev->dev, -1,
 			       rdc321x_sb_cells, ARRAY_SIZE(rdc321x_sb_cells),
 			       NULL, 0, NULL);
 }
 
-static void rdc321x_sb_remove(struct pci_dev *pdev)
-{
-	mfd_remove_devices(&pdev->dev);
-}
-
 static const struct pci_device_id rdc321x_sb_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_RDC, PCI_DEVICE_ID_RDC_R6030) },
 	{}
@@ -105,7 +100,6 @@ static struct pci_driver rdc321x_sb_driver = {
 	.name		= "RDC321x Southbridge",
 	.id_table	= rdc321x_sb_table,
 	.probe		= rdc321x_sb_probe,
-	.remove		= rdc321x_sb_remove,
 };
 
 module_pci_driver(rdc321x_sb_driver);
-- 
2.1.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 11/20] mfd: rdc321x: Use devm_mfd_add_devices() for mfd_device registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-05 14:10 +0200

csiph-web