]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/chips/isp1301_omap.c
Merge with /home/tmlind/src/kernel/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / i2c / chips / isp1301_omap.c
index 14734431d935eea1a40cc33cfc3bbc6cbdca64f7..041c126965412f954592bb671253dbe59ac009b9 100644 (file)
@@ -891,26 +891,27 @@ static int otg_init(struct isp1301 *isp)
        return 0;
 }
 
-static int otg_probe(struct device *dev)
+static int otg_probe(struct platform_device *dev)
 {
        // struct omap_usb_config *config = dev->platform_data;
 
-       otg_dev = to_platform_device(dev);
+       otg_dev = dev;
        return 0;
 }
 
-static int otg_remove(struct device *dev)
+static int otg_remove(struct platform_device *dev)
 {
        otg_dev = 0;
        return 0;
 }
 
-struct device_driver omap_otg_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "omap_otg",
-       .bus            = &platform_bus_type,
+struct platform_driver omap_otg_driver = {
        .probe          = otg_probe,
-       .remove         = otg_remove,   
+       .remove         = otg_remove,
+       .driver         = {
+               .owner  = THIS_MODULE,
+               .name   = "omap_otg",
+       },
 };
 
 static int otg_bind(struct isp1301 *isp)
@@ -920,7 +921,7 @@ static int otg_bind(struct isp1301 *isp)
        if (otg_dev)
                return -EBUSY;
 
-       status = driver_register(&omap_otg_driver);
+       status = platform_driver_register(&omap_otg_driver);
        if (status < 0)
                return status;
 
@@ -931,7 +932,7 @@ static int otg_bind(struct isp1301 *isp)
                status = -ENODEV;
 
        if (status < 0)
-               driver_unregister(&omap_otg_driver);
+               platform_driver_unregister(&omap_otg_driver);
        return status;
 }