Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336413
b: refs/heads/master
c: 9387760
h: refs/heads/master
i:
  336411: d790120
v: v3
  • Loading branch information
Axel Lin authored and Linus Walleij committed Nov 15, 2012
1 parent a6a6663 commit bf8c73c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 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: 507ccdbfd80020c402cbbf65ceeb3235edb79021
refs/heads/master: 9387760db221420f56a9f43a7d079c9fb209e32e
10 changes: 2 additions & 8 deletions trunk/drivers/pinctrl/pinctrl-pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ int pxa3xx_pinctrl_register(struct platform_device *pdev,
{
struct pinctrl_desc *desc;
struct resource *res;
int ret = 0;

if (!info || !info->cputype)
return -EINVAL;
Expand All @@ -190,29 +189,24 @@ int pxa3xx_pinctrl_register(struct platform_device *pdev,
return -ENOENT;
info->phy_base = res->start;
info->phy_size = resource_size(res);
info->virt_base = ioremap(info->phy_base, info->phy_size);
info->virt_base = devm_request_and_ioremap(&pdev->dev, res);
if (!info->virt_base)
return -ENOMEM;
info->pctrl = pinctrl_register(desc, &pdev->dev, info);
if (!info->pctrl) {
dev_err(&pdev->dev, "failed to register PXA pinmux driver\n");
ret = -EINVAL;
goto err;
return -EINVAL;
}
pinctrl_add_gpio_range(info->pctrl, &pxa3xx_pinctrl_gpio_range);
platform_set_drvdata(pdev, info);
return 0;
err:
iounmap(info->virt_base);
return ret;
}

int pxa3xx_pinctrl_unregister(struct platform_device *pdev)
{
struct pxa3xx_pinmux_info *info = platform_get_drvdata(pdev);

pinctrl_unregister(info->pctrl);
iounmap(info->virt_base);
platform_set_drvdata(pdev, NULL);
return 0;
}
Expand Down

0 comments on commit bf8c73c

Please sign in to comment.