diff options
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-rw-r--r-- | drivers/usb/host/isp1362-hcd.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index ae3044019382..8196fa11fec4 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c | |||
@@ -2649,8 +2649,6 @@ static struct hc_driver isp1362_hc_driver = { | |||
2649 | 2649 | ||
2650 | /*-------------------------------------------------------------------------*/ | 2650 | /*-------------------------------------------------------------------------*/ |
2651 | 2651 | ||
2652 | #define resource_len(r) (((r)->end - (r)->start) + 1) | ||
2653 | |||
2654 | static int __devexit isp1362_remove(struct platform_device *pdev) | 2652 | static int __devexit isp1362_remove(struct platform_device *pdev) |
2655 | { | 2653 | { |
2656 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 2654 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
@@ -2672,12 +2670,12 @@ static int __devexit isp1362_remove(struct platform_device *pdev) | |||
2672 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 2670 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
2673 | DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start); | 2671 | DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start); |
2674 | if (res) | 2672 | if (res) |
2675 | release_mem_region(res->start, resource_len(res)); | 2673 | release_mem_region(res->start, resource_size(res)); |
2676 | 2674 | ||
2677 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2675 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2678 | DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start); | 2676 | DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start); |
2679 | if (res) | 2677 | if (res) |
2680 | release_mem_region(res->start, resource_len(res)); | 2678 | release_mem_region(res->start, resource_size(res)); |
2681 | 2679 | ||
2682 | DBG(0, "%s: put_hcd\n", __func__); | 2680 | DBG(0, "%s: put_hcd\n", __func__); |
2683 | usb_put_hcd(hcd); | 2681 | usb_put_hcd(hcd); |
@@ -2723,21 +2721,21 @@ static int __init isp1362_probe(struct platform_device *pdev) | |||
2723 | goto err1; | 2721 | goto err1; |
2724 | } | 2722 | } |
2725 | 2723 | ||
2726 | if (!request_mem_region(addr->start, resource_len(addr), hcd_name)) { | 2724 | if (!request_mem_region(addr->start, resource_size(addr), hcd_name)) { |
2727 | retval = -EBUSY; | 2725 | retval = -EBUSY; |
2728 | goto err1; | 2726 | goto err1; |
2729 | } | 2727 | } |
2730 | addr_reg = ioremap(addr->start, resource_len(addr)); | 2728 | addr_reg = ioremap(addr->start, resource_size(addr)); |
2731 | if (addr_reg == NULL) { | 2729 | if (addr_reg == NULL) { |
2732 | retval = -ENOMEM; | 2730 | retval = -ENOMEM; |
2733 | goto err2; | 2731 | goto err2; |
2734 | } | 2732 | } |
2735 | 2733 | ||
2736 | if (!request_mem_region(data->start, resource_len(data), hcd_name)) { | 2734 | if (!request_mem_region(data->start, resource_size(data), hcd_name)) { |
2737 | retval = -EBUSY; | 2735 | retval = -EBUSY; |
2738 | goto err3; | 2736 | goto err3; |
2739 | } | 2737 | } |
2740 | data_reg = ioremap(data->start, resource_len(data)); | 2738 | data_reg = ioremap(data->start, resource_size(data)); |
2741 | if (data_reg == NULL) { | 2739 | if (data_reg == NULL) { |
2742 | retval = -ENOMEM; | 2740 | retval = -ENOMEM; |
2743 | goto err4; | 2741 | goto err4; |
@@ -2795,13 +2793,13 @@ static int __init isp1362_probe(struct platform_device *pdev) | |||
2795 | iounmap(data_reg); | 2793 | iounmap(data_reg); |
2796 | err4: | 2794 | err4: |
2797 | DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)data->start); | 2795 | DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)data->start); |
2798 | release_mem_region(data->start, resource_len(data)); | 2796 | release_mem_region(data->start, resource_size(data)); |
2799 | err3: | 2797 | err3: |
2800 | DBG(0, "%s: Unmapping addr_reg @ %p\n", __func__, addr_reg); | 2798 | DBG(0, "%s: Unmapping addr_reg @ %p\n", __func__, addr_reg); |
2801 | iounmap(addr_reg); | 2799 | iounmap(addr_reg); |
2802 | err2: | 2800 | err2: |
2803 | DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)addr->start); | 2801 | DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)addr->start); |
2804 | release_mem_region(addr->start, resource_len(addr)); | 2802 | release_mem_region(addr->start, resource_size(addr)); |
2805 | err1: | 2803 | err1: |
2806 | pr_err("%s: init error, %d\n", __func__, retval); | 2804 | pr_err("%s: init error, %d\n", __func__, retval); |
2807 | 2805 | ||