From: Laurent Pinchart Date: Sat, 15 Dec 2012 22:51:18 +0000 (+0100) Subject: sh-pfc: Remove unused resource and num_resources platform data fields X-Git-Tag: next-20130218~14^2^5~38 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=56dc04af3b5e54be330e18630301d2bda5d365eb;p=karo-tx-linux.git sh-pfc: Remove unused resource and num_resources platform data fields The fields are now unused, remove them. Signed-off-by: Laurent Pinchart Acked-by: Paul Mundt Acked-by: Linus Walleij Signed-off-by: Simon Horman --- diff --git a/drivers/sh/pfc/core.c b/drivers/sh/pfc/core.c index 9456c70a2da7..8e7818bccb29 100644 --- a/drivers/sh/pfc/core.c +++ b/drivers/sh/pfc/core.c @@ -28,31 +28,22 @@ static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev) { - unsigned int num_resources; struct resource *res; int k; - if (pdev->num_resources) { - num_resources = pdev->num_resources; - res = pdev->resource; - } else { - num_resources = pfc->pdata->num_resources; - res = pfc->pdata->resource; - } - - if (num_resources == 0) { + if (pdev->num_resources == 0) { pfc->num_windows = 0; return 0; } - pfc->window = devm_kzalloc(pfc->dev, num_resources * + pfc->window = devm_kzalloc(pfc->dev, pdev->num_resources * sizeof(*pfc->window), GFP_NOWAIT); if (!pfc->window) return -ENOMEM; - pfc->num_windows = num_resources; + pfc->num_windows = pdev->num_resources; - for (k = 0; k < num_resources; k++, res++) { + for (k = 0, res = pdev->resource; k < pdev->num_resources; k++, res++) { WARN_ON(resource_type(res) != IORESOURCE_MEM); pfc->window[k].phys = res->start; pfc->window[k].size = resource_size(res); diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index fa1fec084229..4f942337d77e 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h @@ -111,9 +111,6 @@ struct sh_pfc_platform_data { struct pinmux_irq *gpio_irq; unsigned int gpio_irq_size; - struct resource *resource; - unsigned int num_resources; - unsigned long unlock_reg; };