[PATCH V4 1/5] of: Implement managed of_iomap()

viresh kumar viresh.linux at gmail.com
Mon Apr 16 12:21:58 EDT 2012


On 4/16/12, Grant Likely <grant.likely at secretlab.ca> wrote:
> It isn't recommended anymore. Use the bus_type specific helpers instead.

Ok. So here is fixup for 3/5 of this patchset.

@Linus: I will merge this with PACH 3/5 and send pull request to Arnd.

fixup! pinctrl: Add SPEAr pinctrl drivers

---
 drivers/pinctrl/spear/pinctrl-spear.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-spear.c
b/drivers/pinctrl/spear/pinctrl-spear.c
index ad70be7..3ec53df 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -289,18 +289,23 @@ int __devinit spear_pinctrl_probe(struct
platform_device *pdev,
 		struct spear_pinctrl_machdata *machdata)
 {
 	struct device_node *np = pdev->dev.of_node;
+	struct resource *res;
 	struct spear_pmx *pmx;

 	if (!machdata)
 		return -ENODEV;

+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res)
+		return -EINVAL;
+
 	pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
 	if (!pmx) {
 		dev_err(&pdev->dev, "Can't alloc spear_pmx\n");
 		return -ENOMEM;
 	}

-	pmx->vbase = devm_of_iomap(&pdev->dev, 0);
+	pmx->vbase = devm_ioremap(&pdev->dev, res->start, resource_size(res));
 	if (!pmx->vbase) {
 		dev_err(&pdev->dev, "Couldn't ioremap at index 0\n");
 		return -ENODEV;



More information about the linux-arm-kernel mailing list