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>
This commit is contained in:
parent
08e380a53a
commit
7360544c2b
@ -85,16 +85,12 @@ static int rdc321x_sb_probe(struct pci_dev *pdev,
|
|||||||
rdc321x_gpio_pdata.sb_pdev = pdev;
|
rdc321x_gpio_pdata.sb_pdev = pdev;
|
||||||
rdc321x_wdt_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),
|
rdc321x_sb_cells,
|
||||||
|
ARRAY_SIZE(rdc321x_sb_cells),
|
||||||
NULL, 0, NULL);
|
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[] = {
|
static const struct pci_device_id rdc321x_sb_table[] = {
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_RDC, PCI_DEVICE_ID_RDC_R6030) },
|
{ PCI_DEVICE(PCI_VENDOR_ID_RDC, PCI_DEVICE_ID_RDC_R6030) },
|
||||||
{}
|
{}
|
||||||
@ -105,7 +101,6 @@ static struct pci_driver rdc321x_sb_driver = {
|
|||||||
.name = "RDC321x Southbridge",
|
.name = "RDC321x Southbridge",
|
||||||
.id_table = rdc321x_sb_table,
|
.id_table = rdc321x_sb_table,
|
||||||
.probe = rdc321x_sb_probe,
|
.probe = rdc321x_sb_probe,
|
||||||
.remove = rdc321x_sb_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_pci_driver(rdc321x_sb_driver);
|
module_pci_driver(rdc321x_sb_driver);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user