aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ali1535.c1
-rw-r--r--drivers/i2c/busses/i2c-ali1563.c1
-rw-r--r--drivers/i2c/busses/i2c-ali15x3.c1
-rw-r--r--drivers/i2c/busses/i2c-amd756.c1
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c1
-rw-r--r--drivers/i2c/busses/i2c-hydra.c1
-rw-r--r--drivers/i2c/busses/i2c-i801.c1
-rw-r--r--drivers/i2c/busses/i2c-i810.c1
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c27
-rw-r--r--drivers/i2c/busses/i2c-ixp2000.c31
-rw-r--r--drivers/i2c/busses/i2c-ixp4xx.c31
-rw-r--r--drivers/i2c/busses/i2c-mpc.c24
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c35
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c1
-rw-r--r--drivers/i2c/busses/i2c-piix4.c1
-rw-r--r--drivers/i2c/busses/i2c-prosavage.c1
-rw-r--r--drivers/i2c/busses/i2c-pxa.c25
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c71
-rw-r--r--drivers/i2c/busses/i2c-savage4.c1
-rw-r--r--drivers/i2c/busses/i2c-sis5595.c1
-rw-r--r--drivers/i2c/busses/i2c-sis630.c1
-rw-r--r--drivers/i2c/busses/i2c-sis96x.c1
-rw-r--r--drivers/i2c/busses/i2c-via.c1
-rw-r--r--drivers/i2c/busses/i2c-viapro.c1
-rw-r--r--drivers/i2c/busses/i2c-voodoo3.c1
-rw-r--r--drivers/i2c/chips/isp1301_omap.c21
26 files changed, 131 insertions, 152 deletions
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
index ba90f5140af6..3eb47890db40 100644
--- a/drivers/i2c/busses/i2c-ali1535.c
+++ b/drivers/i2c/busses/i2c-ali1535.c
@@ -513,7 +513,6 @@ static void __devexit ali1535_remove(struct pci_dev *dev)
513} 513}
514 514
515static struct pci_driver ali1535_driver = { 515static struct pci_driver ali1535_driver = {
516 .owner = THIS_MODULE,
517 .name = "ali1535_smbus", 516 .name = "ali1535_smbus",
518 .id_table = ali1535_ids, 517 .id_table = ali1535_ids,
519 .probe = ali1535_probe, 518 .probe = ali1535_probe,
diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
index f1a62d892425..e6f63208fc4a 100644
--- a/drivers/i2c/busses/i2c-ali1563.c
+++ b/drivers/i2c/busses/i2c-ali1563.c
@@ -408,7 +408,6 @@ static struct pci_device_id __devinitdata ali1563_id_table[] = {
408MODULE_DEVICE_TABLE (pci, ali1563_id_table); 408MODULE_DEVICE_TABLE (pci, ali1563_id_table);
409 409
410static struct pci_driver ali1563_pci_driver = { 410static struct pci_driver ali1563_pci_driver = {
411 .owner = THIS_MODULE,
412 .name = "ali1563_smbus", 411 .name = "ali1563_smbus",
413 .id_table = ali1563_id_table, 412 .id_table = ali1563_id_table,
414 .probe = ali1563_probe, 413 .probe = ali1563_probe,
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
index 400b08ed4299..7a5c0941dbc1 100644
--- a/drivers/i2c/busses/i2c-ali15x3.c
+++ b/drivers/i2c/busses/i2c-ali15x3.c
@@ -504,7 +504,6 @@ static void __devexit ali15x3_remove(struct pci_dev *dev)
504} 504}
505 505
506static struct pci_driver ali15x3_driver = { 506static struct pci_driver ali15x3_driver = {
507 .owner = THIS_MODULE,
508 .name = "ali15x3_smbus", 507 .name = "ali15x3_smbus",
509 .id_table = ali15x3_ids, 508 .id_table = ali15x3_ids,
510 .probe = ali15x3_probe, 509 .probe = ali15x3_probe,
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index de035d137c3f..1750dedaf4b5 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -401,7 +401,6 @@ static void __devexit amd756_remove(struct pci_dev *dev)
401} 401}
402 402
403static struct pci_driver amd756_driver = { 403static struct pci_driver amd756_driver = {
404 .owner = THIS_MODULE,
405 .name = "amd756_smbus", 404 .name = "amd756_smbus",
406 .id_table = amd756_ids, 405 .id_table = amd756_ids,
407 .probe = amd756_probe, 406 .probe = amd756_probe,
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index f3b79a68dbec..e5ef560e686a 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -384,7 +384,6 @@ static void __devexit amd8111_remove(struct pci_dev *dev)
384} 384}
385 385
386static struct pci_driver amd8111_driver = { 386static struct pci_driver amd8111_driver = {
387 .owner = THIS_MODULE,
388 .name = "amd8111_smbus2", 387 .name = "amd8111_smbus2",
389 .id_table = amd8111_ids, 388 .id_table = amd8111_ids,
390 .probe = amd8111_probe, 389 .probe = amd8111_probe,
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c
index 1b5354e24bf5..e0cb3b0f92fa 100644
--- a/drivers/i2c/busses/i2c-hydra.c
+++ b/drivers/i2c/busses/i2c-hydra.c
@@ -155,7 +155,6 @@ static void __devexit hydra_remove(struct pci_dev *dev)
155 155
156 156
157static struct pci_driver hydra_driver = { 157static struct pci_driver hydra_driver = {
158 .owner = THIS_MODULE,
159 .name = "hydra_smbus", 158 .name = "hydra_smbus",
160 .id_table = hydra_ids, 159 .id_table = hydra_ids,
161 .probe = hydra_probe, 160 .probe = hydra_probe,
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 4f63195069da..ac3eafa8aac0 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -560,7 +560,6 @@ static void __devexit i801_remove(struct pci_dev *dev)
560} 560}
561 561
562static struct pci_driver i801_driver = { 562static struct pci_driver i801_driver = {
563 .owner = THIS_MODULE,
564 .name = "i801_smbus", 563 .name = "i801_smbus",
565 .id_table = i801_ids, 564 .id_table = i801_ids,
566 .probe = i801_probe, 565 .probe = i801_probe,
diff --git a/drivers/i2c/busses/i2c-i810.c b/drivers/i2c/busses/i2c-i810.c
index 52bc30593bd7..748be30f2bae 100644
--- a/drivers/i2c/busses/i2c-i810.c
+++ b/drivers/i2c/busses/i2c-i810.c
@@ -233,7 +233,6 @@ static void __devexit i810_remove(struct pci_dev *dev)
233} 233}
234 234
235static struct pci_driver i810_driver = { 235static struct pci_driver i810_driver = {
236 .owner = THIS_MODULE,
237 .name = "i810_smbus", 236 .name = "i810_smbus",
238 .id_table = i810_ids, 237 .id_table = i810_ids,
239 .probe = i810_probe, 238 .probe = i810_probe,
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index cfae4ad00fae..1414851a17b8 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -405,10 +405,9 @@ static struct i2c_algorithm iop3xx_i2c_algo = {
405}; 405};
406 406
407static int 407static int
408iop3xx_i2c_remove(struct device *device) 408iop3xx_i2c_remove(struct platform_device *pdev)
409{ 409{
410 struct platform_device *pdev = to_platform_device(device); 410 struct i2c_adapter *padapter = platform_get_drvdata(pdev);
411 struct i2c_adapter *padapter = dev_get_drvdata(&pdev->dev);
412 struct i2c_algo_iop3xx_data *adapter_data = 411 struct i2c_algo_iop3xx_data *adapter_data =
413 (struct i2c_algo_iop3xx_data *)padapter->algo_data; 412 (struct i2c_algo_iop3xx_data *)padapter->algo_data;
414 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 413 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -426,15 +425,14 @@ iop3xx_i2c_remove(struct device *device)
426 kfree(adapter_data); 425 kfree(adapter_data);
427 kfree(padapter); 426 kfree(padapter);
428 427
429 dev_set_drvdata(&pdev->dev, NULL); 428 platform_set_drvdata(pdev, NULL);
430 429
431 return 0; 430 return 0;
432} 431}
433 432
434static int 433static int
435iop3xx_i2c_probe(struct device *dev) 434iop3xx_i2c_probe(struct platform_device *pdev)
436{ 435{
437 struct platform_device *pdev = to_platform_device(dev);
438 struct resource *res; 436 struct resource *res;
439 int ret; 437 int ret;
440 struct i2c_adapter *new_adapter; 438 struct i2c_adapter *new_adapter;
@@ -499,7 +497,7 @@ iop3xx_i2c_probe(struct device *dev)
499 iop3xx_i2c_set_slave_addr(adapter_data); 497 iop3xx_i2c_set_slave_addr(adapter_data);
500 iop3xx_i2c_enable(adapter_data); 498 iop3xx_i2c_enable(adapter_data);
501 499
502 dev_set_drvdata(&pdev->dev, new_adapter); 500 platform_set_drvdata(pdev, new_adapter);
503 new_adapter->algo_data = adapter_data; 501 new_adapter->algo_data = adapter_data;
504 502
505 i2c_add_adapter(new_adapter); 503 i2c_add_adapter(new_adapter);
@@ -523,24 +521,25 @@ out:
523} 521}
524 522
525 523
526static struct device_driver iop3xx_i2c_driver = { 524static struct platform_driver iop3xx_i2c_driver = {
527 .owner = THIS_MODULE,
528 .name = "IOP3xx-I2C",
529 .bus = &platform_bus_type,
530 .probe = iop3xx_i2c_probe, 525 .probe = iop3xx_i2c_probe,
531 .remove = iop3xx_i2c_remove 526 .remove = iop3xx_i2c_remove,
527 .driver = {
528 .owner = THIS_MODULE,
529 .name = "IOP3xx-I2C",
530 },
532}; 531};
533 532
534static int __init 533static int __init
535i2c_iop3xx_init (void) 534i2c_iop3xx_init (void)
536{ 535{
537 return driver_register(&iop3xx_i2c_driver); 536 return platform_driver_register(&iop3xx_i2c_driver);
538} 537}
539 538
540static void __exit 539static void __exit
541i2c_iop3xx_exit (void) 540i2c_iop3xx_exit (void)
542{ 541{
543 driver_unregister(&iop3xx_i2c_driver); 542 platform_driver_unregister(&iop3xx_i2c_driver);
544 return; 543 return;
545} 544}
546 545
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c
index 64552a376f2d..cd6f45d186ab 100644
--- a/drivers/i2c/busses/i2c-ixp2000.c
+++ b/drivers/i2c/busses/i2c-ixp2000.c
@@ -36,8 +36,6 @@
36#include <asm/hardware.h> /* Pick up IXP2000-specific bits */ 36#include <asm/hardware.h> /* Pick up IXP2000-specific bits */
37#include <asm/arch/gpio.h> 37#include <asm/arch/gpio.h>
38 38
39static struct device_driver ixp2000_i2c_driver;
40
41static inline int ixp2000_scl_pin(void *data) 39static inline int ixp2000_scl_pin(void *data)
42{ 40{
43 return ((struct ixp2000_i2c_pins*)data)->scl_pin; 41 return ((struct ixp2000_i2c_pins*)data)->scl_pin;
@@ -86,12 +84,11 @@ struct ixp2000_i2c_data {
86 struct i2c_algo_bit_data algo_data; 84 struct i2c_algo_bit_data algo_data;
87}; 85};
88 86
89static int ixp2000_i2c_remove(struct device *dev) 87static int ixp2000_i2c_remove(struct platform_device *plat_dev)
90{ 88{
91 struct platform_device *plat_dev = to_platform_device(dev); 89 struct ixp2000_i2c_data *drv_data = platform_get_drvdata(plat_dev);
92 struct ixp2000_i2c_data *drv_data = dev_get_drvdata(&plat_dev->dev);
93 90
94 dev_set_drvdata(&plat_dev->dev, NULL); 91 platform_set_drvdata(plat_dev, NULL);
95 92
96 i2c_bit_del_bus(&drv_data->adapter); 93 i2c_bit_del_bus(&drv_data->adapter);
97 94
@@ -100,10 +97,9 @@ static int ixp2000_i2c_remove(struct device *dev)
100 return 0; 97 return 0;
101} 98}
102 99
103static int ixp2000_i2c_probe(struct device *dev) 100static int ixp2000_i2c_probe(struct platform_device *plat_dev)
104{ 101{
105 int err; 102 int err;
106 struct platform_device *plat_dev = to_platform_device(dev);
107 struct ixp2000_i2c_pins *gpio = plat_dev->dev.platform_data; 103 struct ixp2000_i2c_pins *gpio = plat_dev->dev.platform_data;
108 struct ixp2000_i2c_data *drv_data = 104 struct ixp2000_i2c_data *drv_data =
109 kzalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL); 105 kzalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL);
@@ -122,7 +118,7 @@ static int ixp2000_i2c_probe(struct device *dev)
122 drv_data->algo_data.timeout = 100; 118 drv_data->algo_data.timeout = 100;
123 119
124 drv_data->adapter.id = I2C_HW_B_IXP2000, 120 drv_data->adapter.id = I2C_HW_B_IXP2000,
125 strlcpy(drv_data->adapter.name, ixp2000_i2c_driver.name, 121 strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name,
126 I2C_NAME_SIZE); 122 I2C_NAME_SIZE);
127 drv_data->adapter.algo_data = &drv_data->algo_data, 123 drv_data->adapter.algo_data = &drv_data->algo_data,
128 124
@@ -134,32 +130,33 @@ static int ixp2000_i2c_probe(struct device *dev)
134 gpio_line_set(gpio->sda_pin, 0); 130 gpio_line_set(gpio->sda_pin, 0);
135 131
136 if ((err = i2c_bit_add_bus(&drv_data->adapter)) != 0) { 132 if ((err = i2c_bit_add_bus(&drv_data->adapter)) != 0) {
137 dev_err(dev, "Could not install, error %d\n", err); 133 dev_err(&plat_dev->dev, "Could not install, error %d\n", err);
138 kfree(drv_data); 134 kfree(drv_data);
139 return err; 135 return err;
140 } 136 }
141 137
142 dev_set_drvdata(&plat_dev->dev, drv_data); 138 platform_set_drvdata(plat_dev, drv_data);
143 139
144 return 0; 140 return 0;
145} 141}
146 142
147static struct device_driver ixp2000_i2c_driver = { 143static struct platform_driver ixp2000_i2c_driver = {
148 .owner = THIS_MODULE,
149 .name = "IXP2000-I2C",
150 .bus = &platform_bus_type,
151 .probe = ixp2000_i2c_probe, 144 .probe = ixp2000_i2c_probe,
152 .remove = ixp2000_i2c_remove, 145 .remove = ixp2000_i2c_remove,
146 .driver = {
147 .name = "IXP2000-I2C",
148 .owner = THIS_MODULE,
149 },
153}; 150};
154 151
155static int __init ixp2000_i2c_init(void) 152static int __init ixp2000_i2c_init(void)
156{ 153{
157 return driver_register(&ixp2000_i2c_driver); 154 return platform_driver_register(&ixp2000_i2c_driver);
158} 155}
159 156
160static void __exit ixp2000_i2c_exit(void) 157static void __exit ixp2000_i2c_exit(void)
161{ 158{
162 driver_unregister(&ixp2000_i2c_driver); 159 platform_driver_unregister(&ixp2000_i2c_driver);
163} 160}
164 161
165module_init(ixp2000_i2c_init); 162module_init(ixp2000_i2c_init);
diff --git a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c
index cc652c350814..e422d8b2d4d6 100644
--- a/drivers/i2c/busses/i2c-ixp4xx.c
+++ b/drivers/i2c/busses/i2c-ixp4xx.c
@@ -35,8 +35,6 @@
35 35
36#include <asm/hardware.h> /* Pick up IXP4xx-specific bits */ 36#include <asm/hardware.h> /* Pick up IXP4xx-specific bits */
37 37
38static struct device_driver ixp4xx_i2c_driver;
39
40static inline int ixp4xx_scl_pin(void *data) 38static inline int ixp4xx_scl_pin(void *data)
41{ 39{
42 return ((struct ixp4xx_i2c_pins*)data)->scl_pin; 40 return ((struct ixp4xx_i2c_pins*)data)->scl_pin;
@@ -87,12 +85,11 @@ struct ixp4xx_i2c_data {
87 struct i2c_algo_bit_data algo_data; 85 struct i2c_algo_bit_data algo_data;
88}; 86};
89 87
90static int ixp4xx_i2c_remove(struct device *dev) 88static int ixp4xx_i2c_remove(struct platform_device *plat_dev)
91{ 89{
92 struct platform_device *plat_dev = to_platform_device(dev); 90 struct ixp4xx_i2c_data *drv_data = platform_get_drvdata(plat_dev);
93 struct ixp4xx_i2c_data *drv_data = dev_get_drvdata(&plat_dev->dev);
94 91
95 dev_set_drvdata(&plat_dev->dev, NULL); 92 platform_set_drvdata(plat_dev, NULL);
96 93
97 i2c_bit_del_bus(&drv_data->adapter); 94 i2c_bit_del_bus(&drv_data->adapter);
98 95
@@ -101,10 +98,9 @@ static int ixp4xx_i2c_remove(struct device *dev)
101 return 0; 98 return 0;
102} 99}
103 100
104static int ixp4xx_i2c_probe(struct device *dev) 101static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
105{ 102{
106 int err; 103 int err;
107 struct platform_device *plat_dev = to_platform_device(dev);
108 struct ixp4xx_i2c_pins *gpio = plat_dev->dev.platform_data; 104 struct ixp4xx_i2c_pins *gpio = plat_dev->dev.platform_data;
109 struct ixp4xx_i2c_data *drv_data = 105 struct ixp4xx_i2c_data *drv_data =
110 kzalloc(sizeof(struct ixp4xx_i2c_data), GFP_KERNEL); 106 kzalloc(sizeof(struct ixp4xx_i2c_data), GFP_KERNEL);
@@ -130,7 +126,7 @@ static int ixp4xx_i2c_probe(struct device *dev)
130 drv_data->algo_data.timeout = 100; 126 drv_data->algo_data.timeout = 100;
131 127
132 drv_data->adapter.id = I2C_HW_B_IXP4XX; 128 drv_data->adapter.id = I2C_HW_B_IXP4XX;
133 strlcpy(drv_data->adapter.name, ixp4xx_i2c_driver.name, 129 strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name,
134 I2C_NAME_SIZE); 130 I2C_NAME_SIZE);
135 drv_data->adapter.algo_data = &drv_data->algo_data; 131 drv_data->adapter.algo_data = &drv_data->algo_data;
136 132
@@ -142,33 +138,34 @@ static int ixp4xx_i2c_probe(struct device *dev)
142 gpio_line_set(gpio->sda_pin, 0); 138 gpio_line_set(gpio->sda_pin, 0);
143 139
144 if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) { 140 if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
145 printk(KERN_ERR "ERROR: Could not install %s\n", dev->bus_id); 141 printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id);
146 142
147 kfree(drv_data); 143 kfree(drv_data);
148 return err; 144 return err;
149 } 145 }
150 146
151 dev_set_drvdata(&plat_dev->dev, drv_data); 147 platform_set_drvdata(plat_dev, drv_data);
152 148
153 return 0; 149 return 0;
154} 150}
155 151
156static struct device_driver ixp4xx_i2c_driver = { 152static struct platform_driver ixp4xx_i2c_driver = {
157 .owner = THIS_MODULE,
158 .name = "IXP4XX-I2C",
159 .bus = &platform_bus_type,
160 .probe = ixp4xx_i2c_probe, 153 .probe = ixp4xx_i2c_probe,
161 .remove = ixp4xx_i2c_remove, 154 .remove = ixp4xx_i2c_remove,
155 .driver = {
156 .name = "IXP4XX-I2C",
157 .owner = THIS_MODULE,
158 },
162}; 159};
163 160
164static int __init ixp4xx_i2c_init(void) 161static int __init ixp4xx_i2c_init(void)
165{ 162{
166 return driver_register(&ixp4xx_i2c_driver); 163 return platform_driver_register(&ixp4xx_i2c_driver);
167} 164}
168 165
169static void __exit ixp4xx_i2c_exit(void) 166static void __exit ixp4xx_i2c_exit(void)
170{ 167{
171 driver_unregister(&ixp4xx_i2c_driver); 168 platform_driver_unregister(&ixp4xx_i2c_driver);
172} 169}
173 170
174module_init(ixp4xx_i2c_init); 171module_init(ixp4xx_i2c_init);
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 65b939a059e9..5ccd338a9dc9 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -288,11 +288,10 @@ static struct i2c_adapter mpc_ops = {
288 .retries = 1 288 .retries = 1
289}; 289};
290 290
291static int fsl_i2c_probe(struct device *device) 291static int fsl_i2c_probe(struct platform_device *pdev)
292{ 292{
293 int result = 0; 293 int result = 0;
294 struct mpc_i2c *i2c; 294 struct mpc_i2c *i2c;
295 struct platform_device *pdev = to_platform_device(device);
296 struct fsl_i2c_platform_data *pdata; 295 struct fsl_i2c_platform_data *pdata;
297 struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 296 struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
298 297
@@ -323,7 +322,7 @@ static int fsl_i2c_probe(struct device *device)
323 } 322 }
324 323
325 mpc_i2c_setclock(i2c); 324 mpc_i2c_setclock(i2c);
326 dev_set_drvdata(device, i2c); 325 platform_set_drvdata(pdev, i2c);
327 326
328 i2c->adap = mpc_ops; 327 i2c->adap = mpc_ops;
329 i2c_set_adapdata(&i2c->adap, i2c); 328 i2c_set_adapdata(&i2c->adap, i2c);
@@ -345,12 +344,12 @@ static int fsl_i2c_probe(struct device *device)
345 return result; 344 return result;
346}; 345};
347 346
348static int fsl_i2c_remove(struct device *device) 347static int fsl_i2c_remove(struct platform_device *pdev)
349{ 348{
350 struct mpc_i2c *i2c = dev_get_drvdata(device); 349 struct mpc_i2c *i2c = platform_get_drvdata(pdev);
351 350
352 i2c_del_adapter(&i2c->adap); 351 i2c_del_adapter(&i2c->adap);
353 dev_set_drvdata(device, NULL); 352 platform_set_drvdata(pdev, NULL);
354 353
355 if (i2c->irq != 0) 354 if (i2c->irq != 0)
356 free_irq(i2c->irq, i2c); 355 free_irq(i2c->irq, i2c);
@@ -361,22 +360,23 @@ static int fsl_i2c_remove(struct device *device)
361}; 360};
362 361
363/* Structure for a device driver */ 362/* Structure for a device driver */
364static struct device_driver fsl_i2c_driver = { 363static struct platform_driver fsl_i2c_driver = {
365 .owner = THIS_MODULE,
366 .name = "fsl-i2c",
367 .bus = &platform_bus_type,
368 .probe = fsl_i2c_probe, 364 .probe = fsl_i2c_probe,
369 .remove = fsl_i2c_remove, 365 .remove = fsl_i2c_remove,
366 .driver = {
367 .owner = THIS_MODULE,
368 .name = "fsl-i2c",
369 },
370}; 370};
371 371
372static int __init fsl_i2c_init(void) 372static int __init fsl_i2c_init(void)
373{ 373{
374 return driver_register(&fsl_i2c_driver); 374 return platform_driver_register(&fsl_i2c_driver);
375} 375}
376 376
377static void __exit fsl_i2c_exit(void) 377static void __exit fsl_i2c_exit(void)
378{ 378{
379 driver_unregister(&fsl_i2c_driver); 379 platform_driver_unregister(&fsl_i2c_driver);
380} 380}
381 381
382module_init(fsl_i2c_init); 382module_init(fsl_i2c_init);
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 6b48027b2ee3..81031eb51056 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -492,11 +492,10 @@ mv64xxx_i2c_unmap_regs(struct mv64xxx_i2c_data *drv_data)
492} 492}
493 493
494static int __devinit 494static int __devinit
495mv64xxx_i2c_probe(struct device *dev) 495mv64xxx_i2c_probe(struct platform_device *pd)
496{ 496{
497 struct platform_device *pd = to_platform_device(dev);
498 struct mv64xxx_i2c_data *drv_data; 497 struct mv64xxx_i2c_data *drv_data;
499 struct mv64xxx_i2c_pdata *pdata = dev->platform_data; 498 struct mv64xxx_i2c_pdata *pdata = pd->dev.platform_data;
500 int rc; 499 int rc;
501 500
502 if ((pd->id != 0) || !pdata) 501 if ((pd->id != 0) || !pdata)
@@ -526,18 +525,19 @@ mv64xxx_i2c_probe(struct device *dev)
526 drv_data->adapter.class = I2C_CLASS_HWMON; 525 drv_data->adapter.class = I2C_CLASS_HWMON;
527 drv_data->adapter.timeout = pdata->timeout; 526 drv_data->adapter.timeout = pdata->timeout;
528 drv_data->adapter.retries = pdata->retries; 527 drv_data->adapter.retries = pdata->retries;
529 dev_set_drvdata(dev, drv_data); 528 platform_set_drvdata(pd, drv_data);
530 i2c_set_adapdata(&drv_data->adapter, drv_data); 529 i2c_set_adapdata(&drv_data->adapter, drv_data);
531 530
532 if (request_irq(drv_data->irq, mv64xxx_i2c_intr, 0, 531 if (request_irq(drv_data->irq, mv64xxx_i2c_intr, 0,
533 MV64XXX_I2C_CTLR_NAME, drv_data)) { 532 MV64XXX_I2C_CTLR_NAME, drv_data)) {
534 533 dev_err(&drv_data->adapter.dev,
535 dev_err(dev, "mv64xxx: Can't register intr handler " 534 "mv64xxx: Can't register intr handler irq: %d\n",
536 "irq: %d\n", drv_data->irq); 535 drv_data->irq);
537 rc = -EINVAL; 536 rc = -EINVAL;
538 goto exit_unmap_regs; 537 goto exit_unmap_regs;
539 } else if ((rc = i2c_add_adapter(&drv_data->adapter)) != 0) { 538 } else if ((rc = i2c_add_adapter(&drv_data->adapter)) != 0) {
540 dev_err(dev, "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc); 539 dev_err(&drv_data->adapter.dev,
540 "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc);
541 goto exit_free_irq; 541 goto exit_free_irq;
542 } 542 }
543 543
@@ -555,9 +555,9 @@ mv64xxx_i2c_probe(struct device *dev)
555} 555}
556 556
557static int __devexit 557static int __devexit
558mv64xxx_i2c_remove(struct device *dev) 558mv64xxx_i2c_remove(struct platform_device *dev)
559{ 559{
560 struct mv64xxx_i2c_data *drv_data = dev_get_drvdata(dev); 560 struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(dev);
561 int rc; 561 int rc;
562 562
563 rc = i2c_del_adapter(&drv_data->adapter); 563 rc = i2c_del_adapter(&drv_data->adapter);
@@ -568,24 +568,25 @@ mv64xxx_i2c_remove(struct device *dev)
568 return rc; 568 return rc;
569} 569}
570 570
571static struct device_driver mv64xxx_i2c_driver = { 571static struct platform_driver mv64xxx_i2c_driver = {
572 .owner = THIS_MODULE,
573 .name = MV64XXX_I2C_CTLR_NAME,
574 .bus = &platform_bus_type,
575 .probe = mv64xxx_i2c_probe, 572 .probe = mv64xxx_i2c_probe,
576 .remove = mv64xxx_i2c_remove, 573 .remove = mv64xxx_i2c_remove,
574 .driver = {
575 .owner = THIS_MODULE,
576 .name = MV64XXX_I2C_CTLR_NAME,
577 },
577}; 578};
578 579
579static int __init 580static int __init
580mv64xxx_i2c_init(void) 581mv64xxx_i2c_init(void)
581{ 582{
582 return driver_register(&mv64xxx_i2c_driver); 583 return platform_driver_register(&mv64xxx_i2c_driver);
583} 584}
584 585
585static void __exit 586static void __exit
586mv64xxx_i2c_exit(void) 587mv64xxx_i2c_exit(void)
587{ 588{
588 driver_unregister(&mv64xxx_i2c_driver); 589 platform_driver_unregister(&mv64xxx_i2c_driver);
589} 590}
590 591
591module_init(mv64xxx_i2c_init); 592module_init(mv64xxx_i2c_init);
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index fd26036e68a3..4d18e6e5f159 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -347,7 +347,6 @@ static void __devexit nforce2_remove(struct pci_dev *dev)
347} 347}
348 348
349static struct pci_driver nforce2_driver = { 349static struct pci_driver nforce2_driver = {
350 .owner = THIS_MODULE,
351 .name = "nForce2_smbus", 350 .name = "nForce2_smbus",
352 .id_table = nforce2_ids, 351 .id_table = nforce2_ids,
353 .probe = nforce2_probe, 352 .probe = nforce2_probe,
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 7d63eec423fe..692f47345481 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -462,7 +462,6 @@ static void __devexit piix4_remove(struct pci_dev *dev)
462} 462}
463 463
464static struct pci_driver piix4_driver = { 464static struct pci_driver piix4_driver = {
465 .owner = THIS_MODULE,
466 .name = "piix4_smbus", 465 .name = "piix4_smbus",
467 .id_table = piix4_ids, 466 .id_table = piix4_ids,
468 .probe = piix4_probe, 467 .probe = piix4_probe,
diff --git a/drivers/i2c/busses/i2c-prosavage.c b/drivers/i2c/busses/i2c-prosavage.c
index 42cb1d8ca659..9479525892e3 100644
--- a/drivers/i2c/busses/i2c-prosavage.c
+++ b/drivers/i2c/busses/i2c-prosavage.c
@@ -301,7 +301,6 @@ static struct pci_device_id prosavage_pci_tbl[] = {
301MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl); 301MODULE_DEVICE_TABLE (pci, prosavage_pci_tbl);
302 302
303static struct pci_driver prosavage_driver = { 303static struct pci_driver prosavage_driver = {
304 .owner = THIS_MODULE,
305 .name = "prosavage_smbus", 304 .name = "prosavage_smbus",
306 .id_table = prosavage_pci_tbl, 305 .id_table = prosavage_pci_tbl,
307 .probe = prosavage_probe, 306 .probe = prosavage_probe,
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 67ccbea24ba4..70f7ab829d36 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -936,10 +936,10 @@ static struct pxa_i2c i2c_pxa = {
936 }, 936 },
937}; 937};
938 938
939static int i2c_pxa_probe(struct device *dev) 939static int i2c_pxa_probe(struct platform_device *dev)
940{ 940{
941 struct pxa_i2c *i2c = &i2c_pxa; 941 struct pxa_i2c *i2c = &i2c_pxa;
942 struct i2c_pxa_platform_data *plat = dev->platform_data; 942 struct i2c_pxa_platform_data *plat = dev->dev.platform_data;
943 int ret; 943 int ret;
944 944
945#ifdef CONFIG_PXA27x 945#ifdef CONFIG_PXA27x
@@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct device *dev)
968 i2c_pxa_reset(i2c); 968 i2c_pxa_reset(i2c);
969 969
970 i2c->adap.algo_data = i2c; 970 i2c->adap.algo_data = i2c;
971 i2c->adap.dev.parent = dev; 971 i2c->adap.dev.parent = &dev->dev;
972 972
973 ret = i2c_add_adapter(&i2c->adap); 973 ret = i2c_add_adapter(&i2c->adap);
974 if (ret < 0) { 974 if (ret < 0) {
@@ -976,7 +976,7 @@ static int i2c_pxa_probe(struct device *dev)
976 goto err_irq; 976 goto err_irq;
977 } 977 }
978 978
979 dev_set_drvdata(dev, i2c); 979 platform_set_drvdata(dev, i2c);
980 980
981#ifdef CONFIG_I2C_PXA_SLAVE 981#ifdef CONFIG_I2C_PXA_SLAVE
982 printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n", 982 printk(KERN_INFO "I2C: %s: PXA I2C adapter, slave address %d\n",
@@ -993,11 +993,11 @@ static int i2c_pxa_probe(struct device *dev)
993 return ret; 993 return ret;
994} 994}
995 995
996static int i2c_pxa_remove(struct device *dev) 996static int i2c_pxa_remove(struct platform_device *dev)
997{ 997{
998 struct pxa_i2c *i2c = dev_get_drvdata(dev); 998 struct pxa_i2c *i2c = platform_get_drvdata(dev);
999 999
1000 dev_set_drvdata(dev, NULL); 1000 platform_set_drvdata(dev, NULL);
1001 1001
1002 i2c_del_adapter(&i2c->adap); 1002 i2c_del_adapter(&i2c->adap);
1003 free_irq(IRQ_I2C, i2c); 1003 free_irq(IRQ_I2C, i2c);
@@ -1006,21 +1006,22 @@ static int i2c_pxa_remove(struct device *dev)
1006 return 0; 1006 return 0;
1007} 1007}
1008 1008
1009static struct device_driver i2c_pxa_driver = { 1009static struct platform_driver i2c_pxa_driver = {
1010 .name = "pxa2xx-i2c",
1011 .bus = &platform_bus_type,
1012 .probe = i2c_pxa_probe, 1010 .probe = i2c_pxa_probe,
1013 .remove = i2c_pxa_remove, 1011 .remove = i2c_pxa_remove,
1012 .driver = {
1013 .name = "pxa2xx-i2c",
1014 },
1014}; 1015};
1015 1016
1016static int __init i2c_adap_pxa_init(void) 1017static int __init i2c_adap_pxa_init(void)
1017{ 1018{
1018 return driver_register(&i2c_pxa_driver); 1019 return platform_driver_register(&i2c_pxa_driver);
1019} 1020}
1020 1021
1021static void i2c_adap_pxa_exit(void) 1022static void i2c_adap_pxa_exit(void)
1022{ 1023{
1023 return driver_unregister(&i2c_pxa_driver); 1024 return platform_driver_unregister(&i2c_pxa_driver);
1024} 1025}
1025 1026
1026module_init(i2c_adap_pxa_init); 1027module_init(i2c_adap_pxa_init);
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 1b582262e677..58cfd3111ef6 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -760,24 +760,23 @@ static void s3c24xx_i2c_free(struct s3c24xx_i2c *i2c)
760 * called by the bus driver when a suitable device is found 760 * called by the bus driver when a suitable device is found
761*/ 761*/
762 762
763static int s3c24xx_i2c_probe(struct device *dev) 763static int s3c24xx_i2c_probe(struct platform_device *pdev)
764{ 764{
765 struct platform_device *pdev = to_platform_device(dev);
766 struct s3c24xx_i2c *i2c = &s3c24xx_i2c; 765 struct s3c24xx_i2c *i2c = &s3c24xx_i2c;
767 struct resource *res; 766 struct resource *res;
768 int ret; 767 int ret;
769 768
770 /* find the clock and enable it */ 769 /* find the clock and enable it */
771 770
772 i2c->dev = dev; 771 i2c->dev = &pdev->dev;
773 i2c->clk = clk_get(dev, "i2c"); 772 i2c->clk = clk_get(&pdev->dev, "i2c");
774 if (IS_ERR(i2c->clk)) { 773 if (IS_ERR(i2c->clk)) {
775 dev_err(dev, "cannot get clock\n"); 774 dev_err(&pdev->dev, "cannot get clock\n");
776 ret = -ENOENT; 775 ret = -ENOENT;
777 goto out; 776 goto out;
778 } 777 }
779 778
780 dev_dbg(dev, "clock source %p\n", i2c->clk); 779 dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
781 780
782 clk_use(i2c->clk); 781 clk_use(i2c->clk);
783 clk_enable(i2c->clk); 782 clk_enable(i2c->clk);
@@ -786,7 +785,7 @@ static int s3c24xx_i2c_probe(struct device *dev)
786 785
787 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 786 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
788 if (res == NULL) { 787 if (res == NULL) {
789 dev_err(dev, "cannot find IO resource\n"); 788 dev_err(&pdev->dev, "cannot find IO resource\n");
790 ret = -ENOENT; 789 ret = -ENOENT;
791 goto out; 790 goto out;
792 } 791 }
@@ -795,7 +794,7 @@ static int s3c24xx_i2c_probe(struct device *dev)
795 pdev->name); 794 pdev->name);
796 795
797 if (i2c->ioarea == NULL) { 796 if (i2c->ioarea == NULL) {
798 dev_err(dev, "cannot request IO\n"); 797 dev_err(&pdev->dev, "cannot request IO\n");
799 ret = -ENXIO; 798 ret = -ENXIO;
800 goto out; 799 goto out;
801 } 800 }
@@ -803,17 +802,17 @@ static int s3c24xx_i2c_probe(struct device *dev)
803 i2c->regs = ioremap(res->start, (res->end-res->start)+1); 802 i2c->regs = ioremap(res->start, (res->end-res->start)+1);
804 803
805 if (i2c->regs == NULL) { 804 if (i2c->regs == NULL) {
806 dev_err(dev, "cannot map IO\n"); 805 dev_err(&pdev->dev, "cannot map IO\n");
807 ret = -ENXIO; 806 ret = -ENXIO;
808 goto out; 807 goto out;
809 } 808 }
810 809
811 dev_dbg(dev, "registers %p (%p, %p)\n", i2c->regs, i2c->ioarea, res); 810 dev_dbg(&pdev->dev, "registers %p (%p, %p)\n", i2c->regs, i2c->ioarea, res);
812 811
813 /* setup info block for the i2c core */ 812 /* setup info block for the i2c core */
814 813
815 i2c->adap.algo_data = i2c; 814 i2c->adap.algo_data = i2c;
816 i2c->adap.dev.parent = dev; 815 i2c->adap.dev.parent = &pdev->dev;
817 816
818 /* initialise the i2c controller */ 817 /* initialise the i2c controller */
819 818
@@ -827,7 +826,7 @@ static int s3c24xx_i2c_probe(struct device *dev)
827 826
828 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 827 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
829 if (res == NULL) { 828 if (res == NULL) {
830 dev_err(dev, "cannot find IRQ\n"); 829 dev_err(&pdev->dev, "cannot find IRQ\n");
831 ret = -ENOENT; 830 ret = -ENOENT;
832 goto out; 831 goto out;
833 } 832 }
@@ -836,23 +835,23 @@ static int s3c24xx_i2c_probe(struct device *dev)
836 pdev->name, i2c); 835 pdev->name, i2c);
837 836
838 if (ret != 0) { 837 if (ret != 0) {
839 dev_err(dev, "cannot claim IRQ\n"); 838 dev_err(&pdev->dev, "cannot claim IRQ\n");
840 goto out; 839 goto out;
841 } 840 }
842 841
843 i2c->irq = res; 842 i2c->irq = res;
844 843
845 dev_dbg(dev, "irq resource %p (%ld)\n", res, res->start); 844 dev_dbg(&pdev->dev, "irq resource %p (%ld)\n", res, res->start);
846 845
847 ret = i2c_add_adapter(&i2c->adap); 846 ret = i2c_add_adapter(&i2c->adap);
848 if (ret < 0) { 847 if (ret < 0) {
849 dev_err(dev, "failed to add bus to i2c core\n"); 848 dev_err(&pdev->dev, "failed to add bus to i2c core\n");
850 goto out; 849 goto out;
851 } 850 }
852 851
853 dev_set_drvdata(dev, i2c); 852 platform_set_drvdata(pdev, i2c);
854 853
855 dev_info(dev, "%s: S3C I2C adapter\n", i2c->adap.dev.bus_id); 854 dev_info(&pdev->dev, "%s: S3C I2C adapter\n", i2c->adap.dev.bus_id);
856 855
857 out: 856 out:
858 if (ret < 0) 857 if (ret < 0)
@@ -866,22 +865,22 @@ static int s3c24xx_i2c_probe(struct device *dev)
866 * called when device is removed from the bus 865 * called when device is removed from the bus
867*/ 866*/
868 867
869static int s3c24xx_i2c_remove(struct device *dev) 868static int s3c24xx_i2c_remove(struct platform_device *pdev)
870{ 869{
871 struct s3c24xx_i2c *i2c = dev_get_drvdata(dev); 870 struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
872 871
873 if (i2c != NULL) { 872 if (i2c != NULL) {
874 s3c24xx_i2c_free(i2c); 873 s3c24xx_i2c_free(i2c);
875 dev_set_drvdata(dev, NULL); 874 platform_set_drvdata(pdev, NULL);
876 } 875 }
877 876
878 return 0; 877 return 0;
879} 878}
880 879
881#ifdef CONFIG_PM 880#ifdef CONFIG_PM
882static int s3c24xx_i2c_resume(struct device *dev) 881static int s3c24xx_i2c_resume(struct platform_device *dev)
883{ 882{
884 struct s3c24xx_i2c *i2c = dev_get_drvdata(dev); 883 struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
885 884
886 if (i2c != NULL) 885 if (i2c != NULL)
887 s3c24xx_i2c_init(i2c); 886 s3c24xx_i2c_init(i2c);
@@ -895,33 +894,35 @@ static int s3c24xx_i2c_resume(struct device *dev)
895 894
896/* device driver for platform bus bits */ 895/* device driver for platform bus bits */
897 896
898static struct device_driver s3c2410_i2c_driver = { 897static struct platform_driver s3c2410_i2c_driver = {
899 .owner = THIS_MODULE,
900 .name = "s3c2410-i2c",
901 .bus = &platform_bus_type,
902 .probe = s3c24xx_i2c_probe, 898 .probe = s3c24xx_i2c_probe,
903 .remove = s3c24xx_i2c_remove, 899 .remove = s3c24xx_i2c_remove,
904 .resume = s3c24xx_i2c_resume, 900 .resume = s3c24xx_i2c_resume,
901 .driver = {
902 .owner = THIS_MODULE,
903 .name = "s3c2410-i2c",
904 },
905}; 905};
906 906
907static struct device_driver s3c2440_i2c_driver = { 907static struct platform_driver s3c2440_i2c_driver = {
908 .owner = THIS_MODULE,
909 .name = "s3c2440-i2c",
910 .bus = &platform_bus_type,
911 .probe = s3c24xx_i2c_probe, 908 .probe = s3c24xx_i2c_probe,
912 .remove = s3c24xx_i2c_remove, 909 .remove = s3c24xx_i2c_remove,
913 .resume = s3c24xx_i2c_resume, 910 .resume = s3c24xx_i2c_resume,
911 .driver = {
912 .owner = THIS_MODULE,
913 .name = "s3c2440-i2c",
914 },
914}; 915};
915 916
916static int __init i2c_adap_s3c_init(void) 917static int __init i2c_adap_s3c_init(void)
917{ 918{
918 int ret; 919 int ret;
919 920
920 ret = driver_register(&s3c2410_i2c_driver); 921 ret = platform_driver_register(&s3c2410_i2c_driver);
921 if (ret == 0) { 922 if (ret == 0) {
922 ret = driver_register(&s3c2440_i2c_driver); 923 ret = platform_driver_register(&s3c2440_i2c_driver);
923 if (ret) 924 if (ret)
924 driver_unregister(&s3c2410_i2c_driver); 925 platform_driver_unregister(&s3c2410_i2c_driver);
925 } 926 }
926 927
927 return ret; 928 return ret;
@@ -929,8 +930,8 @@ static int __init i2c_adap_s3c_init(void)
929 930
930static void __exit i2c_adap_s3c_exit(void) 931static void __exit i2c_adap_s3c_exit(void)
931{ 932{
932 driver_unregister(&s3c2410_i2c_driver); 933 platform_driver_unregister(&s3c2410_i2c_driver);
933 driver_unregister(&s3c2440_i2c_driver); 934 platform_driver_unregister(&s3c2440_i2c_driver);
934} 935}
935 936
936module_init(i2c_adap_s3c_init); 937module_init(i2c_adap_s3c_init);
diff --git a/drivers/i2c/busses/i2c-savage4.c b/drivers/i2c/busses/i2c-savage4.c
index aebe87ba4033..0c8518298e4d 100644
--- a/drivers/i2c/busses/i2c-savage4.c
+++ b/drivers/i2c/busses/i2c-savage4.c
@@ -179,7 +179,6 @@ static void __devexit savage4_remove(struct pci_dev *dev)
179} 179}
180 180
181static struct pci_driver savage4_driver = { 181static struct pci_driver savage4_driver = {
182 .owner = THIS_MODULE,
183 .name = "savage4_smbus", 182 .name = "savage4_smbus",
184 .id_table = savage4_ids, 183 .id_table = savage4_ids,
185 .probe = savage4_probe, 184 .probe = savage4_probe,
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
index 3ad27c3ba15b..b57ab74d23ec 100644
--- a/drivers/i2c/busses/i2c-sis5595.c
+++ b/drivers/i2c/busses/i2c-sis5595.c
@@ -398,7 +398,6 @@ static void __devexit sis5595_remove(struct pci_dev *dev)
398} 398}
399 399
400static struct pci_driver sis5595_driver = { 400static struct pci_driver sis5595_driver = {
401 .owner = THIS_MODULE,
402 .name = "sis5595_smbus", 401 .name = "sis5595_smbus",
403 .id_table = sis5595_ids, 402 .id_table = sis5595_ids,
404 .probe = sis5595_probe, 403 .probe = sis5595_probe,
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index 7f49e5fd3ff0..acb75e282414 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -496,7 +496,6 @@ static void __devexit sis630_remove(struct pci_dev *dev)
496 496
497 497
498static struct pci_driver sis630_driver = { 498static struct pci_driver sis630_driver = {
499 .owner = THIS_MODULE,
500 .name = "sis630_smbus", 499 .name = "sis630_smbus",
501 .id_table = sis630_ids, 500 .id_table = sis630_ids,
502 .probe = sis630_probe, 501 .probe = sis630_probe,
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
index 6a134c091324..3024907cdafe 100644
--- a/drivers/i2c/busses/i2c-sis96x.c
+++ b/drivers/i2c/busses/i2c-sis96x.c
@@ -329,7 +329,6 @@ static void __devexit sis96x_remove(struct pci_dev *dev)
329} 329}
330 330
331static struct pci_driver sis96x_driver = { 331static struct pci_driver sis96x_driver = {
332 .owner = THIS_MODULE,
333 .name = "sis96x_smbus", 332 .name = "sis96x_smbus",
334 .id_table = sis96x_ids, 333 .id_table = sis96x_ids,
335 .probe = sis96x_probe, 334 .probe = sis96x_probe,
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c
index 544a38e64394..484bbacfce6b 100644
--- a/drivers/i2c/busses/i2c-via.c
+++ b/drivers/i2c/busses/i2c-via.c
@@ -159,7 +159,6 @@ static void __devexit vt586b_remove(struct pci_dev *dev)
159 159
160 160
161static struct pci_driver vt586b_driver = { 161static struct pci_driver vt586b_driver = {
162 .owner = THIS_MODULE,
163 .name = "vt586b_smbus", 162 .name = "vt586b_smbus",
164 .id_table = vt586b_ids, 163 .id_table = vt586b_ids,
165 .probe = vt586b_probe, 164 .probe = vt586b_probe,
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index a2237d4b2cf2..47e52bf2c5ec 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -440,7 +440,6 @@ static struct pci_device_id vt596_ids[] = {
440MODULE_DEVICE_TABLE(pci, vt596_ids); 440MODULE_DEVICE_TABLE(pci, vt596_ids);
441 441
442static struct pci_driver vt596_driver = { 442static struct pci_driver vt596_driver = {
443 .owner = THIS_MODULE,
444 .name = "vt596_smbus", 443 .name = "vt596_smbus",
445 .id_table = vt596_ids, 444 .id_table = vt596_ids,
446 .probe = vt596_probe, 445 .probe = vt596_probe,
diff --git a/drivers/i2c/busses/i2c-voodoo3.c b/drivers/i2c/busses/i2c-voodoo3.c
index 650c3ebde84c..b675773b0cc1 100644
--- a/drivers/i2c/busses/i2c-voodoo3.c
+++ b/drivers/i2c/busses/i2c-voodoo3.c
@@ -225,7 +225,6 @@ static void __devexit voodoo3_remove(struct pci_dev *dev)
225} 225}
226 226
227static struct pci_driver voodoo3_driver = { 227static struct pci_driver voodoo3_driver = {
228 .owner = THIS_MODULE,
229 .name = "voodoo3_smbus", 228 .name = "voodoo3_smbus",
230 .id_table = voodoo3_ids, 229 .id_table = voodoo3_ids,
231 .probe = voodoo3_probe, 230 .probe = voodoo3_probe,
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index 9dbb72fffbe2..d2a100d77839 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -873,26 +873,27 @@ static int otg_init(struct isp1301 *isp)
873 return 0; 873 return 0;
874} 874}
875 875
876static int otg_probe(struct device *dev) 876static int otg_probe(struct platform_device *dev)
877{ 877{
878 // struct omap_usb_config *config = dev->platform_data; 878 // struct omap_usb_config *config = dev->platform_data;
879 879
880 otg_dev = to_platform_device(dev); 880 otg_dev = dev;
881 return 0; 881 return 0;
882} 882}
883 883
884static int otg_remove(struct device *dev) 884static int otg_remove(struct platform_device *dev)
885{ 885{
886 otg_dev = 0; 886 otg_dev = 0;
887 return 0; 887 return 0;
888} 888}
889 889
890struct device_driver omap_otg_driver = { 890struct platform_driver omap_otg_driver = {
891 .owner = THIS_MODULE,
892 .name = "omap_otg",
893 .bus = &platform_bus_type,
894 .probe = otg_probe, 891 .probe = otg_probe,
895 .remove = otg_remove, 892 .remove = otg_remove,
893 .driver = {
894 .owner = THIS_MODULE,
895 .name = "omap_otg",
896 },
896}; 897};
897 898
898static int otg_bind(struct isp1301 *isp) 899static int otg_bind(struct isp1301 *isp)
@@ -902,7 +903,7 @@ static int otg_bind(struct isp1301 *isp)
902 if (otg_dev) 903 if (otg_dev)
903 return -EBUSY; 904 return -EBUSY;
904 905
905 status = driver_register(&omap_otg_driver); 906 status = platform_driver_register(&omap_otg_driver);
906 if (status < 0) 907 if (status < 0)
907 return status; 908 return status;
908 909
@@ -913,7 +914,7 @@ static int otg_bind(struct isp1301 *isp)
913 status = -ENODEV; 914 status = -ENODEV;
914 915
915 if (status < 0) 916 if (status < 0)
916 driver_unregister(&omap_otg_driver); 917 platform_driver_unregister(&omap_otg_driver);
917 return status; 918 return status;
918} 919}
919 920