diff options
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 47cadf474149..c37df8d0fa28 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -1241,8 +1241,8 @@ static int serial_omap_probe(struct platform_device *pdev) | |||
1241 | return -ENODEV; | 1241 | return -ENODEV; |
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | if (!request_mem_region(mem->start, (mem->end - mem->start) + 1, | 1244 | if (!request_mem_region(mem->start, resource_size(mem), |
1245 | pdev->dev.driver->name)) { | 1245 | pdev->dev.driver->name)) { |
1246 | dev_err(&pdev->dev, "memory region already claimed\n"); | 1246 | dev_err(&pdev->dev, "memory region already claimed\n"); |
1247 | return -EBUSY; | 1247 | return -EBUSY; |
1248 | } | 1248 | } |
@@ -1308,7 +1308,7 @@ err: | |||
1308 | dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n", | 1308 | dev_err(&pdev->dev, "[UART%d]: failure [%s]: %d\n", |
1309 | pdev->id, __func__, ret); | 1309 | pdev->id, __func__, ret); |
1310 | do_release_region: | 1310 | do_release_region: |
1311 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 1311 | release_mem_region(mem->start, resource_size(mem)); |
1312 | return ret; | 1312 | return ret; |
1313 | } | 1313 | } |
1314 | 1314 | ||