USB: ohci-s3c2410: use resource_size()
[linux-block.git] / drivers / usb / host / ohci-s3c2410.c
index a68af2dd55ca2aa93d6a5f6ddbb904911e0263b8..5837d218050dab4cc944a6ea8846c6db055ed62f 100644 (file)
@@ -353,7 +353,7 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver,
                return -ENOMEM;
 
        hcd->rsrc_start = dev->resource[0].start;
-       hcd->rsrc_len   = dev->resource[0].end - dev->resource[0].start + 1;
+       hcd->rsrc_len   = resource_size(&dev->resource[0]);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                dev_err(&dev->dev, "request_mem_region failed\n");
@@ -473,12 +473,12 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
 
 /* device driver */
 
-static int ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev)
+static int __devinit ohci_hcd_s3c2410_drv_probe(struct platform_device *pdev)
 {
        return usb_hcd_s3c2410_probe(&ohci_s3c2410_hc_driver, pdev);
 }
 
-static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
+static int __devexit ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
 
@@ -488,7 +488,7 @@ static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
 
 static struct platform_driver ohci_hcd_s3c2410_driver = {
        .probe          = ohci_hcd_s3c2410_drv_probe,
-       .remove         = ohci_hcd_s3c2410_drv_remove,
+       .remove         = __devexit_p(ohci_hcd_s3c2410_drv_remove),
        .shutdown       = usb_hcd_platform_shutdown,
        /*.suspend      = ohci_hcd_s3c2410_drv_suspend, */
        /*.resume       = ohci_hcd_s3c2410_drv_resume, */