Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355372
b: refs/heads/master
c: 56dc04a
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Simon Horman committed Jan 25, 2013
1 parent 9fb6acf commit 3a3d583
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8682b3c522c639f3a0de31c86bb91f2f9a6c76cb
refs/heads/master: 56dc04af3b5e54be330e18630301d2bda5d365eb
17 changes: 4 additions & 13 deletions trunk/drivers/sh/pfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/linux/sh_pfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit 3a3d583

Please sign in to comment.