diff options
author | Lee Jones <lee.jones@linaro.org> | 2019-10-18 11:36:44 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-11-11 08:45:03 +0000 |
commit | 99cd1059759833f83cc7e442fe2c3b0bd4dff399 (patch) | |
tree | bd25ebfce335752b9cd80c4dfef49d757bd7a096 /drivers/mfd | |
parent | 2d4ba9173aecc7e69ae6b842564437b9209c7a71 (diff) | |
download | linux-99cd1059759833f83cc7e442fe2c3b0bd4dff399.tar.gz linux-99cd1059759833f83cc7e442fe2c3b0bd4dff399.tar.bz2 linux-99cd1059759833f83cc7e442fe2c3b0bd4dff399.zip |
mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries
CS5535 is the only user of mfd_clone_cell(). It makes more sense to
register child devices in the traditional way and remove the quite
bespoke mfd_clone_cell() call from the MFD API.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/cs5535-mfd.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c index 3b569b231510..d0fb2e52ee76 100644 --- a/drivers/mfd/cs5535-mfd.c +++ b/drivers/mfd/cs5535-mfd.c @@ -50,16 +50,19 @@ static struct mfd_cell cs5535_mfd_cells[] = { .num_resources = 1, .resources = &cs5535_mfd_resources[PMS_BAR], }, +}; + +static struct mfd_cell cs5535_olpc_mfd_cells[] = { { - .name = "cs5535-acpi", + .name = "olpc-xo1-pm-acpi", + .num_resources = 1, + .resources = &cs5535_mfd_resources[ACPI_BAR], + }, + { + .name = "olpc-xo1-sci-acpi", .num_resources = 1, .resources = &cs5535_mfd_resources[ACPI_BAR], }, -}; - -static const char *olpc_acpi_clones[] = { - "olpc-xo1-pm-acpi", - "olpc-xo1-sci-acpi" }; static int cs5535_mfd_probe(struct pci_dev *pdev, @@ -101,10 +104,14 @@ static int cs5535_mfd_probe(struct pci_dev *pdev, goto err_remove_devices; } - err = mfd_clone_cell("cs5535-acpi", olpc_acpi_clones, - ARRAY_SIZE(olpc_acpi_clones)); + err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, + cs5535_olpc_mfd_cells, + ARRAY_SIZE(cs5535_olpc_mfd_cells), + NULL, 0, NULL); if (err) { - dev_err(&pdev->dev, "Failed to clone MFD cell\n"); + dev_err(&pdev->dev, + "Failed to add CS5535 OLPC sub-devices: %d\n", + err); goto err_release_acpi; } } |