aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/isp1760-if.c')
-rw-r--r--drivers/usb/host/isp1760-if.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 100d5faebe3c..ec85d0c3cc3e 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -13,8 +13,8 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/usb/isp1760.h> 15#include <linux/usb/isp1760.h>
16#include <linux/usb/hcd.h>
16 17
17#include "../core/hcd.h"
18#include "isp1760-hcd.h" 18#include "isp1760-hcd.h"
19 19
20#ifdef CONFIG_PPC_OF 20#ifdef CONFIG_PPC_OF
@@ -36,7 +36,7 @@ static int of_isp1760_probe(struct of_device *dev,
36 struct resource memory; 36 struct resource memory;
37 struct of_irq oirq; 37 struct of_irq oirq;
38 int virq; 38 int virq;
39 u64 res_len; 39 resource_size_t res_len;
40 int ret; 40 int ret;
41 const unsigned int *prop; 41 const unsigned int *prop;
42 unsigned int devflags = 0; 42 unsigned int devflags = 0;
@@ -45,13 +45,12 @@ static int of_isp1760_probe(struct of_device *dev,
45 if (ret) 45 if (ret)
46 return -ENXIO; 46 return -ENXIO;
47 47
48 res = request_mem_region(memory.start, memory.end - memory.start + 1, 48 res_len = resource_size(&memory);
49 dev_name(&dev->dev)); 49
50 res = request_mem_region(memory.start, res_len, dev_name(&dev->dev));
50 if (!res) 51 if (!res)
51 return -EBUSY; 52 return -EBUSY;
52 53
53 res_len = memory.end - memory.start + 1;
54
55 if (of_irq_map_one(dp, 0, &oirq)) { 54 if (of_irq_map_one(dp, 0, &oirq)) {
56 ret = -ENODEV; 55 ret = -ENODEV;
57 goto release_reg; 56 goto release_reg;
@@ -92,7 +91,7 @@ static int of_isp1760_probe(struct of_device *dev,
92 return ret; 91 return ret;
93 92
94release_reg: 93release_reg:
95 release_mem_region(memory.start, memory.end - memory.start + 1); 94 release_mem_region(memory.start, res_len);
96 return ret; 95 return ret;
97} 96}
98 97