diff options
Diffstat (limited to 'drivers/watchdog/imx2_wdt.c')
-rw-r--r-- | drivers/watchdog/imx2_wdt.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index b8ef2c6dca7c..c44c3334003a 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c | |||
@@ -247,7 +247,6 @@ static struct miscdevice imx2_wdt_miscdev = { | |||
247 | static int __init imx2_wdt_probe(struct platform_device *pdev) | 247 | static int __init imx2_wdt_probe(struct platform_device *pdev) |
248 | { | 248 | { |
249 | int ret; | 249 | int ret; |
250 | int res_size; | ||
251 | struct resource *res; | 250 | struct resource *res; |
252 | 251 | ||
253 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 252 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -256,15 +255,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev) | |||
256 | return -ENODEV; | 255 | return -ENODEV; |
257 | } | 256 | } |
258 | 257 | ||
259 | res_size = resource_size(res); | 258 | imx2_wdt.base = devm_request_and_ioremap(&pdev->dev, res); |
260 | if (!devm_request_mem_region(&pdev->dev, res->start, res_size, | ||
261 | res->name)) { | ||
262 | dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n", | ||
263 | res_size, res->start); | ||
264 | return -ENOMEM; | ||
265 | } | ||
266 | |||
267 | imx2_wdt.base = devm_ioremap_nocache(&pdev->dev, res->start, res_size); | ||
268 | if (!imx2_wdt.base) { | 259 | if (!imx2_wdt.base) { |
269 | dev_err(&pdev->dev, "ioremap failed\n"); | 260 | dev_err(&pdev->dev, "ioremap failed\n"); |
270 | return -ENOMEM; | 261 | return -ENOMEM; |