diff options
Diffstat (limited to 'drivers/gpio/gpio-stp-xway.c')
-rw-r--r-- | drivers/gpio/gpio-stp-xway.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c index 85841ee70b17..c20e05151212 100644 --- a/drivers/gpio/gpio-stp-xway.c +++ b/drivers/gpio/gpio-stp-xway.c | |||
@@ -214,11 +214,10 @@ static int xway_stp_probe(struct platform_device *pdev) | |||
214 | if (!chip) | 214 | if (!chip) |
215 | return -ENOMEM; | 215 | return -ENOMEM; |
216 | 216 | ||
217 | chip->virt = devm_request_and_ioremap(&pdev->dev, res); | 217 | chip->virt = devm_ioremap_resource(&pdev->dev, res); |
218 | if (!chip->virt) { | 218 | if (IS_ERR(chip->virt)) |
219 | dev_err(&pdev->dev, "failed to remap STP memory\n"); | 219 | return PTR_ERR(chip->virt); |
220 | return -ENOMEM; | 220 | |
221 | } | ||
222 | chip->gc.dev = &pdev->dev; | 221 | chip->gc.dev = &pdev->dev; |
223 | chip->gc.label = "stp-xway"; | 222 | chip->gc.label = "stp-xway"; |
224 | chip->gc.direction_output = xway_stp_dir_out; | 223 | chip->gc.direction_output = xway_stp_dir_out; |