diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-03-18 16:53:31 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-07-12 11:23:58 +0200 |
commit | 4e657946cbf68998b51b331375a1209e90792fe4 (patch) | |
tree | c5a64f3141e85adef5993d63af0ac9493c05414a /drivers/mfd | |
parent | cf4129ea212d71f7860bded25d42388265172bee (diff) | |
download | linux-4e657946cbf68998b51b331375a1209e90792fe4.tar.bz2 |
mfd: db8500 stop passing around platform data
Except for the constant DB8500_PRCMU_FW_VERSION_OFFSET number, nothing
is ever passed through the platform data and used in a driver, so we
can simply stop passing it around.
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ab8500-core.c | 4 | ||||
-rw-r--r-- | drivers/mfd/ab8500-sysctrl.c | 34 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 10 |
3 files changed, 3 insertions, 45 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index f3d689176fc2..589eebfc13df 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -1087,7 +1087,6 @@ static int ab8500_probe(struct platform_device *pdev) "Vbus Detect (USB)", "USB ID Detect", "UART Factory Mode Detect"}; - struct ab8500_platform_data *plat = dev_get_platdata(&pdev->dev); const struct platform_device_id *platid = platform_get_device_id(pdev); enum ab8500_version version = AB8500_VERSION_UNDEFINED; struct device_node *np = pdev->dev.of_node; @@ -1219,9 +1218,6 @@ static int ab8500_probe(struct platform_device *pdev) pr_cont("None\n"); } - if (plat && plat->init) - plat->init(ab8500); - if (is_ab9540(ab8500)) { ret = get_register_interruptible(ab8500, AB8500_CHARGER, AB8500_CH_USBCH_STAT1_REG, &value); diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c index b9f0010309f9..207cc497958a 100644 --- a/drivers/mfd/ab8500-sysctrl.c +++ b/drivers/mfd/ab8500-sysctrl.c @@ -127,45 +127,11 @@ EXPORT_SYMBOL(ab8500_sysctrl_write); static int ab8500_sysctrl_probe(struct platform_device *pdev) { - struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent); - struct ab8500_platform_data *plat; - struct ab8500_sysctrl_platform_data *pdata; - - plat = dev_get_platdata(pdev->dev.parent); - - if (!plat) - return -EINVAL; - sysctrl_dev = &pdev->dev; if (!pm_power_off) pm_power_off = ab8500_power_off; - pdata = plat->sysctrl; - if (pdata) { - int last, ret, i, j; - - if (is_ab8505(ab8500)) - last = AB8500_SYSCLKREQ4RFCLKBUF; - else - last = AB8500_SYSCLKREQ8RFCLKBUF; - - for (i = AB8500_SYSCLKREQ1RFCLKBUF; i <= last; i++) { - j = i - AB8500_SYSCLKREQ1RFCLKBUF; - ret = ab8500_sysctrl_write(i, 0xff, - pdata->initial_req_buf_config[j]); - dev_dbg(&pdev->dev, - "Setting SysClkReq%dRfClkBuf 0x%X\n", - j + 1, - pdata->initial_req_buf_config[j]); - if (ret < 0) { - dev_err(&pdev->dev, - "Can't set sysClkReq%dRfClkBuf: %d\n", - j + 1, ret); - } - } - } - return 0; } diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index c0a86aeb1733..388e268b9bcf 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -3094,8 +3094,7 @@ static void db8500_prcmu_update_cpufreq(void) } } -static int db8500_prcmu_register_ab8500(struct device *parent, - struct ab8500_platform_data *pdata) +static int db8500_prcmu_register_ab8500(struct device *parent) { struct device_node *np; struct resource ab8500_resource; @@ -3103,8 +3102,6 @@ static int db8500_prcmu_register_ab8500(struct device *parent, .name = "ab8500-core", .of_compatible = "stericsson,ab8500", .id = AB8500_VERSION_AB8500, - .platform_data = pdata, - .pdata_size = sizeof(struct ab8500_platform_data), .resources = &ab8500_resource, .num_resources = 1, }; @@ -3133,7 +3130,6 @@ static int db8500_prcmu_register_ab8500(struct device *parent, static int db8500_prcmu_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev); int irq = 0, err = 0; struct resource *res; @@ -3149,7 +3145,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev) return -ENOMEM; } init_prcm_registers(); - dbx500_fw_version_init(pdev, pdata->version_offset); + dbx500_fw_version_init(pdev, DB8500_PRCMU_FW_VERSION_OFFSET); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); if (!res) { dev_err(&pdev->dev, "no prcmu tcdm region provided\n"); @@ -3204,7 +3200,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev) } } - err = db8500_prcmu_register_ab8500(&pdev->dev, pdata->ab_platdata); + err = db8500_prcmu_register_ab8500(&pdev->dev); if (err) { mfd_remove_devices(&pdev->dev); pr_err("prcmu: Failed to add ab8500 subdevice\n"); |