diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-12-15 23:51:18 +0100 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-01-25 09:24:25 +0900 |
commit | 56dc04af3b5e54be330e18630301d2bda5d365eb (patch) | |
tree | 947f3d428b356bd8602d227a706e7e9e171dfcae /drivers/sh | |
parent | 8682b3c522c639f3a0de31c86bb91f2f9a6c76cb (diff) | |
download | linux-56dc04af3b5e54be330e18630301d2bda5d365eb.tar.bz2 |
sh-pfc: Remove unused resource and num_resources platform data fields
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>
Diffstat (limited to 'drivers/sh')
-rw-r--r-- | drivers/sh/pfc/core.c | 17 |
1 files changed, 4 insertions, 13 deletions
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); |