Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355343
b: refs/heads/master
c: c9fa88e
h: refs/heads/master
i:
  355341: 4226420
  355339: 777be7c
  355335: e96be38
  355327: ccd114e
v: v3
  • Loading branch information
Laurent Pinchart authored and Simon Horman committed Jan 25, 2013
1 parent 92d6d75 commit 1499747
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 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: 1724acfd598bdf688218bdd26a5f02dd55b6ec62
refs/heads/master: c9fa88e23a8c6d1a72ba37c7d4df3d05051e8e8e
25 changes: 4 additions & 21 deletions trunk/drivers/sh/pfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@

#include "core.h"

static void pfc_iounmap(struct sh_pfc *pfc)
{
int k;

for (k = 0; k < pfc->pdata->num_resources; k++)
if (pfc->window[k].virt)
iounmap(pfc->window[k].virt);
}

static int pfc_ioremap(struct sh_pfc *pfc)
{
struct resource *res;
Expand All @@ -53,12 +44,10 @@ static int pfc_ioremap(struct sh_pfc *pfc)
WARN_ON(resource_type(res) != IORESOURCE_MEM);
pfc->window[k].phys = res->start;
pfc->window[k].size = resource_size(res);
pfc->window[k].virt = ioremap_nocache(res->start,
resource_size(res));
if (!pfc->window[k].virt) {
pfc_iounmap(pfc);
pfc->window[k].virt = devm_ioremap_nocache(pfc->dev, res->start,
resource_size(res));
if (!pfc->window[k].virt)
return -ENOMEM;
}
}

return 0;
Expand Down Expand Up @@ -524,7 +513,7 @@ static int sh_pfc_probe(struct platform_device *pdev)
*/
ret = sh_pfc_register_pinctrl(pfc);
if (unlikely(ret != 0))
goto err;
return ret;

#ifdef CONFIG_GPIO_SH_PFC
/*
Expand All @@ -546,10 +535,6 @@ static int sh_pfc_probe(struct platform_device *pdev)
pr_info("%s support registered\n", pdata->name);

return 0;

err:
pfc_iounmap(pfc);
return ret;
}

static int sh_pfc_remove(struct platform_device *pdev)
Expand All @@ -561,8 +546,6 @@ static int sh_pfc_remove(struct platform_device *pdev)
#endif
sh_pfc_unregister_pinctrl(pfc);

pfc_iounmap(pfc);

platform_set_drvdata(pdev, NULL);

return 0;
Expand Down

0 comments on commit 1499747

Please sign in to comment.