Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Laxman Dewangan and committed by
Lee Jones
7360544c 08e380a5

+4 -9
+4 -9
drivers/mfd/rdc321x-southbridge.c
··· 85 85 rdc321x_gpio_pdata.sb_pdev = pdev; 86 86 rdc321x_wdt_pdata.sb_pdev = pdev; 87 87 88 - return mfd_add_devices(&pdev->dev, -1, 89 - rdc321x_sb_cells, ARRAY_SIZE(rdc321x_sb_cells), 90 - NULL, 0, NULL); 91 - } 92 - 93 - static void rdc321x_sb_remove(struct pci_dev *pdev) 94 - { 95 - mfd_remove_devices(&pdev->dev); 88 + return devm_mfd_add_devices(&pdev->dev, -1, 89 + rdc321x_sb_cells, 90 + ARRAY_SIZE(rdc321x_sb_cells), 91 + NULL, 0, NULL); 96 92 } 97 93 98 94 static const struct pci_device_id rdc321x_sb_table[] = { ··· 101 105 .name = "RDC321x Southbridge", 102 106 .id_table = rdc321x_sb_table, 103 107 .probe = rdc321x_sb_probe, 104 - .remove = rdc321x_sb_remove, 105 108 }; 106 109 107 110 module_pci_driver(rdc321x_sb_driver);