X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fchips%2Fisp1301_omap.c;h=e6f1ab7b913c1d59db9c7e6e7e98b3920927ea21;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=7f29a8aff1656792a46a75444dba89df70f05a91;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index 7f29a8aff..e6f1ab7b9 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -145,7 +145,6 @@ static inline void notresponding(struct isp1301 *isp) static unsigned short normal_i2c[] = { ISP_BASE, ISP_BASE + 1, I2C_CLIENT_END }; -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -874,25 +873,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 = { - .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) @@ -902,7 +903,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; @@ -913,7 +914,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; } @@ -1490,7 +1491,7 @@ static int isp1301_probe(struct i2c_adapter *bus, int address, int kind) if (the_transceiver) return 0; - isp = kcalloc(1, sizeof *isp, GFP_KERNEL); + isp = kzalloc(sizeof *isp, GFP_KERNEL); if (!isp) return 0; @@ -1631,11 +1632,9 @@ static int isp1301_scan_bus(struct i2c_adapter *bus) } static struct i2c_driver isp1301_driver = { - .owner = THIS_MODULE, - .name = "isp1301_omap", - .id = 1301, /* FIXME "official", i2c-ids.h */ - .class = I2C_CLASS_HWMON, - .flags = I2C_DF_NOTIFY, + .driver = { + .name = "isp1301_omap", + }, .attach_adapter = isp1301_scan_bus, .detach_client = isp1301_detach_client, };