Skip to content

Commit 56dc04a

Browse files
Laurent Pincharthorms
authored andcommitted
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>
1 parent 8682b3c commit 56dc04a

2 files changed

Lines changed: 4 additions & 16 deletions

File tree

‎drivers/sh/pfc/core.c‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,22 @@
2828

2929
static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
3030
{
31-
unsigned int num_resources;
3231
struct resource *res;
3332
int k;
3433

35-
if (pdev->num_resources) {
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) {
34+
if (pdev->num_resources == 0) {
4435
pfc->num_windows = 0;
4536
return 0;
4637
}
4738

48-
pfc->window = devm_kzalloc(pfc->dev, num_resources *
39+
pfc->window = devm_kzalloc(pfc->dev, pdev->num_resources *
4940
sizeof(*pfc->window), GFP_NOWAIT);
5041
if (!pfc->window)
5142
return -ENOMEM;
5243

53-
pfc->num_windows = num_resources;
44+
pfc->num_windows = pdev->num_resources;
5445

55-
for (k = 0; k < num_resources; k++, res++) {
46+
for (k = 0, res = pdev->resource; k < pdev->num_resources; k++, res++) {
5647
WARN_ON(resource_type(res) != IORESOURCE_MEM);
5748
pfc->window[k].phys = res->start;
5849
pfc->window[k].size = resource_size(res);

‎include/linux/sh_pfc.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ struct sh_pfc_platform_data {
111111
struct pinmux_irq *gpio_irq;
112112
unsigned int gpio_irq_size;
113113

114-
struct resource *resource;
115-
unsigned int num_resources;
116-
117114
unsigned long unlock_reg;
118115
};
119116

0 commit comments

Comments
 (0)