diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-12-15 17:51:18 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-01-24 19:24:25 -0500 |
commit | 56dc04af3b5e54be330e18630301d2bda5d365eb (patch) | |
tree | 947f3d428b356bd8602d227a706e7e9e171dfcae | |
parent | 8682b3c522c639f3a0de31c86bb91f2f9a6c76cb (diff) |
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>
-rw-r--r-- | drivers/sh/pfc/core.c | 17 | ||||
-rw-r--r-- | include/linux/sh_pfc.h | 3 |
2 files changed, 4 insertions, 16 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 @@ | |||
28 | 28 | ||
29 | static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev) | 29 | static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev) |
30 | { | 30 | { |
31 | unsigned int num_resources; | ||
32 | struct resource *res; | 31 | struct resource *res; |
33 | int k; | 32 | int k; |
34 | 33 | ||
35 | if (pdev->num_resources) { | 34 | if (pdev->num_resources == 0) { |
36 | num_resources = pdev->num_resources; | ||
37 | res = pdev->resource; | ||
38 | } else { | ||
39 | num_resources = pfc->pdata->num_resources; | ||
40 | res = pfc->pdata->resource; | ||
41 | } | ||
42 | |||
43 | if (num_resources == 0) { | ||
44 | pfc->num_windows = 0; | 35 | pfc->num_windows = 0; |
45 | return 0; | 36 | return 0; |
46 | } | 37 | } |
47 | 38 | ||
48 | pfc->window = devm_kzalloc(pfc->dev, num_resources * | 39 | pfc->window = devm_kzalloc(pfc->dev, pdev->num_resources * |
49 | sizeof(*pfc->window), GFP_NOWAIT); | 40 | sizeof(*pfc->window), GFP_NOWAIT); |
50 | if (!pfc->window) | 41 | if (!pfc->window) |
51 | return -ENOMEM; | 42 | return -ENOMEM; |
52 | 43 | ||
53 | pfc->num_windows = num_resources; | 44 | pfc->num_windows = pdev->num_resources; |
54 | 45 | ||
55 | for (k = 0; k < num_resources; k++, res++) { | 46 | for (k = 0, res = pdev->resource; k < pdev->num_resources; k++, res++) { |
56 | WARN_ON(resource_type(res) != IORESOURCE_MEM); | 47 | WARN_ON(resource_type(res) != IORESOURCE_MEM); |
57 | pfc->window[k].phys = res->start; | 48 | pfc->window[k].phys = res->start; |
58 | pfc->window[k].size = resource_size(res); | 49 | 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 { | |||
111 | struct pinmux_irq *gpio_irq; | 111 | struct pinmux_irq *gpio_irq; |
112 | unsigned int gpio_irq_size; | 112 | unsigned int gpio_irq_size; |
113 | 113 | ||
114 | struct resource *resource; | ||
115 | unsigned int num_resources; | ||
116 | |||
117 | unsigned long unlock_reg; | 114 | unsigned long unlock_reg; |
118 | }; | 115 | }; |
119 | 116 | ||