]> Pileus Git - ~andy/linux/blobdiff - drivers/gpio/gpio-stp-xway.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / drivers / gpio / gpio-stp-xway.c
index 85841ee70b17fc4dab51fc4ebc2d9886e5584de0..c20e05151212990321ef4e0ac11e5b079a553030 100644 (file)
@@ -214,11 +214,10 @@ static int xway_stp_probe(struct platform_device *pdev)
        if (!chip)
                return -ENOMEM;
 
-       chip->virt = devm_request_and_ioremap(&pdev->dev, res);
-       if (!chip->virt) {
-               dev_err(&pdev->dev, "failed to remap STP memory\n");
-               return -ENOMEM;
-       }
+       chip->virt = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(chip->virt))
+               return PTR_ERR(chip->virt);
+       
        chip->gc.dev = &pdev->dev;
        chip->gc.label = "stp-xway";
        chip->gc.direction_output = xway_stp_dir_out;