sh-pfc: Remove unused resource and num_resources platform data fields
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 15 Dec 2012 22:51:18 +0000 (23:51 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 25 Jan 2013 00:24:25 +0000 (09:24 +0900)
The fields are now unused, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/sh/pfc/core.c
include/linux/sh_pfc.h

index 9456c70a2da7c15c9bf3c3290cf88a1bc6417d1c..8e7818bccb298ca4e822110eaebf752be5396157 100644 (file)
 
 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);
index fa1fec084229e4878862a8635e162eb1000d7771..4f942337d77e821ceb93b80a46fbca39ee50464a 100644 (file)
@@ -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;
 };