Commit 8a9947552d43b0d20d5fa23ac0ba435d526be454

Authored by Jean Delvare
Committed by Greg Kroah-Hartman
1 parent ff179c8cf5

[PATCH] i2c: Drop i2c_driver.flags, 2 of 3

Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 91 changed files with 5 additions and 95 deletions Side-by-side Diff

Documentation/i2c/porting-clients
... ... @@ -109,6 +109,9 @@
109 109 there is a MODULE_LICENSE() line, at the bottom of the file
110 110 (after MODULE_AUTHOR() and MODULE_DESCRIPTION(), in this order).
111 111  
  112 +* [Driver] The flags field of the i2c_driver structure is gone.
  113 + I2C_DF_NOTIFY is now the default behavior.
  114 +
112 115 Coding policy:
113 116  
114 117 * [Copyright] Use (C), not (c), for copyright.
Documentation/i2c/writing-clients
... ... @@ -27,7 +27,6 @@
27 27 static struct i2c_driver foo_driver = {
28 28 .owner = THIS_MODULE,
29 29 .name = "Foo version 2.3 driver",
30   - .flags = I2C_DF_NOTIFY,
31 30 .attach_adapter = &foo_attach_adapter,
32 31 .detach_client = &foo_detach_client,
33 32 .command = &foo_command /* may be NULL */
... ... @@ -35,10 +34,6 @@
35 34  
36 35 The name field must match the driver name, including the case. It must not
37 36 contain spaces, and may be up to 31 characters long.
38   -
39   -Don't worry about the flags field; just put I2C_DF_NOTIFY into it. This
40   -means that your driver will be notified when new adapters are found.
41   -This is almost always what you want.
42 37  
43 38 All other fields are for call-back functions which will be explained
44 39 below.
arch/arm/mach-pxa/akita-ioexp.c
... ... @@ -127,7 +127,6 @@
127 127 .owner = THIS_MODULE,
128 128 .name = "akita-max7310",
129 129 .id = I2C_DRIVERID_AKITAIOEXP,
130   - .flags = I2C_DF_NOTIFY,
131 130 .attach_adapter = max7310_attach_adapter,
132 131 .detach_client = max7310_detach_client,
133 132 };
drivers/acorn/char/pcf8583.c
... ... @@ -259,7 +259,6 @@
259 259 static struct i2c_driver pcf8583_driver = {
260 260 .name = "PCF8583",
261 261 .id = I2C_DRIVERID_PCF8583,
262   - .flags = I2C_DF_NOTIFY,
263 262 .attach_adapter = pcf8583_probe,
264 263 .detach_client = pcf8583_detach,
265 264 .command = pcf8583_command
drivers/hwmon/adm1021.c
... ... @@ -129,7 +129,6 @@
129 129 .owner = THIS_MODULE,
130 130 .name = "adm1021",
131 131 .id = I2C_DRIVERID_ADM1021,
132   - .flags = I2C_DF_NOTIFY,
133 132 .attach_adapter = adm1021_attach_adapter,
134 133 .detach_client = adm1021_detach_client,
135 134 };
drivers/hwmon/adm1025.c
... ... @@ -121,7 +121,6 @@
121 121 .owner = THIS_MODULE,
122 122 .name = "adm1025",
123 123 .id = I2C_DRIVERID_ADM1025,
124   - .flags = I2C_DF_NOTIFY,
125 124 .attach_adapter = adm1025_attach_adapter,
126 125 .detach_client = adm1025_detach_client,
127 126 };
drivers/hwmon/adm1026.c
... ... @@ -310,7 +310,6 @@
310 310 static struct i2c_driver adm1026_driver = {
311 311 .owner = THIS_MODULE,
312 312 .name = "adm1026",
313   - .flags = I2C_DF_NOTIFY,
314 313 .attach_adapter = adm1026_attach_adapter,
315 314 .detach_client = adm1026_detach_client,
316 315 };
drivers/hwmon/adm1031.c
... ... @@ -107,7 +107,6 @@
107 107 static struct i2c_driver adm1031_driver = {
108 108 .owner = THIS_MODULE,
109 109 .name = "adm1031",
110   - .flags = I2C_DF_NOTIFY,
111 110 .attach_adapter = adm1031_attach_adapter,
112 111 .detach_client = adm1031_detach_client,
113 112 };
drivers/hwmon/adm9240.c
... ... @@ -140,7 +140,6 @@
140 140 .owner = THIS_MODULE,
141 141 .name = "adm9240",
142 142 .id = I2C_DRIVERID_ADM9240,
143   - .flags = I2C_DF_NOTIFY,
144 143 .attach_adapter = adm9240_attach_adapter,
145 144 .detach_client = adm9240_detach_client,
146 145 };
drivers/hwmon/asb100.c
... ... @@ -220,7 +220,6 @@
220 220 .owner = THIS_MODULE,
221 221 .name = "asb100",
222 222 .id = I2C_DRIVERID_ASB100,
223   - .flags = I2C_DF_NOTIFY,
224 223 .attach_adapter = asb100_attach_adapter,
225 224 .detach_client = asb100_detach_client,
226 225 };
drivers/hwmon/atxp1.c
... ... @@ -52,7 +52,6 @@
52 52 static struct i2c_driver atxp1_driver = {
53 53 .owner = THIS_MODULE,
54 54 .name = "atxp1",
55   - .flags = I2C_DF_NOTIFY,
56 55 .attach_adapter = atxp1_attach_adapter,
57 56 .detach_client = atxp1_detach_client,
58 57 };
drivers/hwmon/ds1621.c
... ... @@ -92,7 +92,6 @@
92 92 .owner = THIS_MODULE,
93 93 .name = "ds1621",
94 94 .id = I2C_DRIVERID_DS1621,
95   - .flags = I2C_DF_NOTIFY,
96 95 .attach_adapter = ds1621_attach_adapter,
97 96 .detach_client = ds1621_detach_client,
98 97 };
drivers/hwmon/fscher.c
... ... @@ -121,7 +121,6 @@
121 121 .owner = THIS_MODULE,
122 122 .name = "fscher",
123 123 .id = I2C_DRIVERID_FSCHER,
124   - .flags = I2C_DF_NOTIFY,
125 124 .attach_adapter = fscher_attach_adapter,
126 125 .detach_client = fscher_detach_client,
127 126 };
drivers/hwmon/fscpos.c
... ... @@ -103,7 +103,6 @@
103 103 .owner = THIS_MODULE,
104 104 .name = "fscpos",
105 105 .id = I2C_DRIVERID_FSCPOS,
106   - .flags = I2C_DF_NOTIFY,
107 106 .attach_adapter = fscpos_attach_adapter,
108 107 .detach_client = fscpos_detach_client,
109 108 };
drivers/hwmon/gl518sm.c
... ... @@ -154,7 +154,6 @@
154 154 .owner = THIS_MODULE,
155 155 .name = "gl518sm",
156 156 .id = I2C_DRIVERID_GL518,
157   - .flags = I2C_DF_NOTIFY,
158 157 .attach_adapter = gl518_attach_adapter,
159 158 .detach_client = gl518_detach_client,
160 159 };
drivers/hwmon/gl520sm.c
... ... @@ -112,7 +112,6 @@
112 112 .owner = THIS_MODULE,
113 113 .name = "gl520sm",
114 114 .id = I2C_DRIVERID_GL520,
115   - .flags = I2C_DF_NOTIFY,
116 115 .attach_adapter = gl520_attach_adapter,
117 116 .detach_client = gl520_detach_client,
118 117 };
drivers/hwmon/it87.c
... ... @@ -237,7 +237,6 @@
237 237 .owner = THIS_MODULE,
238 238 .name = "it87",
239 239 .id = I2C_DRIVERID_IT87,
240   - .flags = I2C_DF_NOTIFY,
241 240 .attach_adapter = it87_attach_adapter,
242 241 .detach_client = it87_detach_client,
243 242 };
drivers/hwmon/lm63.c
... ... @@ -141,7 +141,6 @@
141 141 static struct i2c_driver lm63_driver = {
142 142 .owner = THIS_MODULE,
143 143 .name = "lm63",
144   - .flags = I2C_DF_NOTIFY,
145 144 .attach_adapter = lm63_attach_adapter,
146 145 .detach_client = lm63_detach_client,
147 146 };
drivers/hwmon/lm75.c
... ... @@ -69,7 +69,6 @@
69 69 .owner = THIS_MODULE,
70 70 .name = "lm75",
71 71 .id = I2C_DRIVERID_LM75,
72   - .flags = I2C_DF_NOTIFY,
73 72 .attach_adapter = lm75_attach_adapter,
74 73 .detach_client = lm75_detach_client,
75 74 };
drivers/hwmon/lm77.c
... ... @@ -76,7 +76,6 @@
76 76 static struct i2c_driver lm77_driver = {
77 77 .owner = THIS_MODULE,
78 78 .name = "lm77",
79   - .flags = I2C_DF_NOTIFY,
80 79 .attach_adapter = lm77_attach_adapter,
81 80 .detach_client = lm77_detach_client,
82 81 };
drivers/hwmon/lm78.c
... ... @@ -167,7 +167,6 @@
167 167 .owner = THIS_MODULE,
168 168 .name = "lm78",
169 169 .id = I2C_DRIVERID_LM78,
170   - .flags = I2C_DF_NOTIFY,
171 170 .attach_adapter = lm78_attach_adapter,
172 171 .detach_client = lm78_detach_client,
173 172 };
drivers/hwmon/lm80.c
... ... @@ -146,7 +146,6 @@
146 146 .owner = THIS_MODULE,
147 147 .name = "lm80",
148 148 .id = I2C_DRIVERID_LM80,
149   - .flags = I2C_DF_NOTIFY,
150 149 .attach_adapter = lm80_attach_adapter,
151 150 .detach_client = lm80_detach_client,
152 151 };
drivers/hwmon/lm83.c
... ... @@ -127,7 +127,6 @@
127 127 .owner = THIS_MODULE,
128 128 .name = "lm83",
129 129 .id = I2C_DRIVERID_LM83,
130   - .flags = I2C_DF_NOTIFY,
131 130 .attach_adapter = lm83_attach_adapter,
132 131 .detach_client = lm83_detach_client,
133 132 };
drivers/hwmon/lm85.c
... ... @@ -383,7 +383,6 @@
383 383 .owner = THIS_MODULE,
384 384 .name = "lm85",
385 385 .id = I2C_DRIVERID_LM85,
386   - .flags = I2C_DF_NOTIFY,
387 386 .attach_adapter = lm85_attach_adapter,
388 387 .detach_client = lm85_detach_client,
389 388 };
drivers/hwmon/lm87.c
... ... @@ -164,7 +164,6 @@
164 164 .owner = THIS_MODULE,
165 165 .name = "lm87",
166 166 .id = I2C_DRIVERID_LM87,
167   - .flags = I2C_DF_NOTIFY,
168 167 .attach_adapter = lm87_attach_adapter,
169 168 .detach_client = lm87_detach_client,
170 169 };
drivers/hwmon/lm90.c
... ... @@ -189,7 +189,6 @@
189 189 .owner = THIS_MODULE,
190 190 .name = "lm90",
191 191 .id = I2C_DRIVERID_LM90,
192   - .flags = I2C_DF_NOTIFY,
193 192 .attach_adapter = lm90_attach_adapter,
194 193 .detach_client = lm90_detach_client,
195 194 };
drivers/hwmon/lm92.c
... ... @@ -413,7 +413,6 @@
413 413 .owner = THIS_MODULE,
414 414 .name = "lm92",
415 415 .id = I2C_DRIVERID_LM92,
416   - .flags = I2C_DF_NOTIFY,
417 416 .attach_adapter = lm92_attach_adapter,
418 417 .detach_client = lm92_detach_client,
419 418 };
drivers/hwmon/max1619.c
... ... @@ -92,7 +92,6 @@
92 92 static struct i2c_driver max1619_driver = {
93 93 .owner = THIS_MODULE,
94 94 .name = "max1619",
95   - .flags = I2C_DF_NOTIFY,
96 95 .attach_adapter = max1619_attach_adapter,
97 96 .detach_client = max1619_detach_client,
98 97 };
drivers/hwmon/w83781d.c
... ... @@ -272,7 +272,6 @@
272 272 .owner = THIS_MODULE,
273 273 .name = "w83781d",
274 274 .id = I2C_DRIVERID_W83781D,
275   - .flags = I2C_DF_NOTIFY,
276 275 .attach_adapter = w83781d_attach_adapter,
277 276 .detach_client = w83781d_detach_client,
278 277 };
drivers/hwmon/w83792d.c
... ... @@ -319,7 +319,6 @@
319 319 static struct i2c_driver w83792d_driver = {
320 320 .owner = THIS_MODULE,
321 321 .name = "w83792d",
322   - .flags = I2C_DF_NOTIFY,
323 322 .attach_adapter = w83792d_attach_adapter,
324 323 .detach_client = w83792d_detach_client,
325 324 };
drivers/hwmon/w83l785ts.c
... ... @@ -95,7 +95,6 @@
95 95 .owner = THIS_MODULE,
96 96 .name = "w83l785ts",
97 97 .id = I2C_DRIVERID_W83L785TS,
98   - .flags = I2C_DF_NOTIFY,
99 98 .attach_adapter = w83l785ts_attach_adapter,
100 99 .detach_client = w83l785ts_detach_client,
101 100 };
drivers/i2c/chips/ds1337.c
... ... @@ -54,7 +54,6 @@
54 54 static struct i2c_driver ds1337_driver = {
55 55 .owner = THIS_MODULE,
56 56 .name = "ds1337",
57   - .flags = I2C_DF_NOTIFY,
58 57 .attach_adapter = ds1337_attach_adapter,
59 58 .detach_client = ds1337_detach_client,
60 59 .command = ds1337_command,
drivers/i2c/chips/ds1374.c
... ... @@ -235,7 +235,6 @@
235 235 .owner = THIS_MODULE,
236 236 .name = DS1374_DRV_NAME,
237 237 .id = I2C_DRIVERID_DS1374,
238   - .flags = I2C_DF_NOTIFY,
239 238 .attach_adapter = ds1374_attach,
240 239 .detach_client = ds1374_detach,
241 240 };
drivers/i2c/chips/eeprom.c
... ... @@ -71,7 +71,6 @@
71 71 .owner = THIS_MODULE,
72 72 .name = "eeprom",
73 73 .id = I2C_DRIVERID_EEPROM,
74   - .flags = I2C_DF_NOTIFY,
75 74 .attach_adapter = eeprom_attach_adapter,
76 75 .detach_client = eeprom_detach_client,
77 76 };
drivers/i2c/chips/isp1301_omap.c
... ... @@ -1636,7 +1636,6 @@
1636 1636 .name = "isp1301_omap",
1637 1637 .id = 1301, /* FIXME "official", i2c-ids.h */
1638 1638 .class = I2C_CLASS_HWMON,
1639   - .flags = I2C_DF_NOTIFY,
1640 1639 .attach_adapter = isp1301_scan_bus,
1641 1640 .detach_client = isp1301_detach_client,
1642 1641 };
drivers/i2c/chips/m41t00.c
... ... @@ -214,7 +214,6 @@
214 214 .owner = THIS_MODULE,
215 215 .name = M41T00_DRV_NAME,
216 216 .id = I2C_DRIVERID_STM41T00,
217   - .flags = I2C_DF_NOTIFY,
218 217 .attach_adapter = m41t00_attach,
219 218 .detach_client = m41t00_detach,
220 219 };
drivers/i2c/chips/max6875.c
... ... @@ -69,7 +69,6 @@
69 69 static struct i2c_driver max6875_driver = {
70 70 .owner = THIS_MODULE,
71 71 .name = "max6875",
72   - .flags = I2C_DF_NOTIFY,
73 72 .attach_adapter = max6875_attach_adapter,
74 73 .detach_client = max6875_detach_client,
75 74 };
drivers/i2c/chips/pca9539.c
... ... @@ -40,7 +40,6 @@
40 40 static struct i2c_driver pca9539_driver = {
41 41 .owner = THIS_MODULE,
42 42 .name = "pca9539",
43   - .flags = I2C_DF_NOTIFY,
44 43 .attach_adapter = pca9539_attach_adapter,
45 44 .detach_client = pca9539_detach_client,
46 45 };
drivers/i2c/chips/pcf8574.c
... ... @@ -68,7 +68,6 @@
68 68 .owner = THIS_MODULE,
69 69 .name = "pcf8574",
70 70 .id = I2C_DRIVERID_PCF8574,
71   - .flags = I2C_DF_NOTIFY,
72 71 .attach_adapter = pcf8574_attach_adapter,
73 72 .detach_client = pcf8574_detach_client,
74 73 };
drivers/i2c/chips/pcf8591.c
... ... @@ -91,7 +91,6 @@
91 91 .owner = THIS_MODULE,
92 92 .name = "pcf8591",
93 93 .id = I2C_DRIVERID_PCF8591,
94   - .flags = I2C_DF_NOTIFY,
95 94 .attach_adapter = pcf8591_attach_adapter,
96 95 .detach_client = pcf8591_detach_client,
97 96 };
drivers/i2c/chips/rtc8564.c
... ... @@ -362,7 +362,6 @@
362 362 .owner = THIS_MODULE,
363 363 .name = "RTC8564",
364 364 .id = I2C_DRIVERID_RTC8564,
365   - .flags = I2C_DF_NOTIFY,
366 365 .attach_adapter = rtc8564_probe,
367 366 .detach_client = rtc8564_detach,
368 367 .command = rtc8564_command
drivers/i2c/chips/tps65010.c
... ... @@ -639,7 +639,6 @@
639 639 static struct i2c_driver tps65010_driver = {
640 640 .owner = THIS_MODULE,
641 641 .name = "tps65010",
642   - .flags = I2C_DF_NOTIFY,
643 642 .attach_adapter = tps65010_scan_bus,
644 643 .detach_client = __exit_p(tps65010_detach_client),
645 644 };
drivers/i2c/chips/x1205.c
... ... @@ -107,7 +107,6 @@
107 107 static struct i2c_driver x1205_driver = {
108 108 .owner = THIS_MODULE,
109 109 .name = "x1205",
110   - .flags = I2C_DF_NOTIFY,
111 110 .attach_adapter = &x1205_attach,
112 111 .detach_client = &x1205_detach,
113 112 };
drivers/i2c/i2c-core.c
... ... @@ -197,7 +197,7 @@
197 197 /* inform drivers of new adapters */
198 198 list_for_each(item,&drivers) {
199 199 driver = list_entry(item, struct i2c_driver, list);
200   - if (driver->flags & I2C_DF_NOTIFY)
  200 + if (driver->attach_adapter)
201 201 /* We ignore the return code; if it fails, too bad */
202 202 driver->attach_adapter(adap);
203 203 }
... ... @@ -309,7 +309,7 @@
309 309 pr_debug("i2c-core: driver [%s] registered\n", driver->name);
310 310  
311 311 /* now look for instances of driver on our adapters */
312   - if (driver->flags & I2C_DF_NOTIFY) {
  312 + if (driver->attach_adapter) {
313 313 list_for_each(item,&adapters) {
314 314 adapter = list_entry(item, struct i2c_adapter, list);
315 315 driver->attach_adapter(adapter);
drivers/i2c/i2c-dev.c
... ... @@ -484,7 +484,6 @@
484 484 .owner = THIS_MODULE,
485 485 .name = "dev_driver",
486 486 .id = I2C_DRIVERID_I2CDEV,
487   - .flags = I2C_DF_NOTIFY,
488 487 .attach_adapter = i2cdev_attach_adapter,
489 488 .detach_adapter = i2cdev_detach_adapter,
490 489 .detach_client = i2cdev_detach_client,
drivers/macintosh/therm_adt746x.c
... ... @@ -173,7 +173,6 @@
173 173 static struct i2c_driver thermostat_driver = {
174 174 .owner = THIS_MODULE,
175 175 .name = "therm_adt746x",
176   - .flags = I2C_DF_NOTIFY,
177 176 .attach_adapter = attach_thermostat,
178 177 .detach_adapter = detach_thermostat,
179 178 };
drivers/macintosh/therm_pm72.c
... ... @@ -285,7 +285,6 @@
285 285 {
286 286 .owner = THIS_MODULE,
287 287 .name = "therm_pm72",
288   - .flags = I2C_DF_NOTIFY,
289 288 .attach_adapter = therm_pm72_attach,
290 289 .detach_adapter = therm_pm72_detach,
291 290 };
drivers/macintosh/therm_windtunnel.c
... ... @@ -357,7 +357,6 @@
357 357 .owner = THIS_MODULE,
358 358 .name = "therm_windtunnel",
359 359 .id = I2C_DRIVERID_G4FAN,
360   - .flags = I2C_DF_NOTIFY,
361 360 .attach_adapter = do_attach,
362 361 .detach_client = do_detach,
363 362 };
drivers/macintosh/windfarm_lm75_sensor.c
... ... @@ -49,7 +49,6 @@
49 49 static struct i2c_driver wf_lm75_driver = {
50 50 .owner = THIS_MODULE,
51 51 .name = "wf_lm75",
52   - .flags = I2C_DF_NOTIFY,
53 52 .attach_adapter = wf_lm75_attach,
54 53 .detach_client = wf_lm75_detach,
55 54 };
drivers/media/video/adv7170.c
... ... @@ -502,7 +502,6 @@
502 502 .name = "adv7170", /* name */
503 503  
504 504 .id = I2C_DRIVERID_ADV7170,
505   - .flags = I2C_DF_NOTIFY,
506 505  
507 506 .attach_adapter = adv7170_attach_adapter,
508 507 .detach_client = adv7170_detach_client,
drivers/media/video/adv7175.c
... ... @@ -552,7 +552,6 @@
552 552 .name = "adv7175", /* name */
553 553  
554 554 .id = I2C_DRIVERID_ADV7175,
555   - .flags = I2C_DF_NOTIFY,
556 555  
557 556 .attach_adapter = adv7175_attach_adapter,
558 557 .detach_client = adv7175_detach_client,
drivers/media/video/bt819.c
... ... @@ -627,7 +627,6 @@
627 627 .name = "bt819",
628 628  
629 629 .id = I2C_DRIVERID_BT819,
630   - .flags = I2C_DF_NOTIFY,
631 630  
632 631 .attach_adapter = bt819_attach_adapter,
633 632 .detach_client = bt819_detach_client,
drivers/media/video/bt832.c
... ... @@ -233,7 +233,6 @@
233 233 .owner = THIS_MODULE,
234 234 .name = "i2c bt832 driver",
235 235 .id = -1, /* FIXME */
236   - .flags = I2C_DF_NOTIFY,
237 236 .attach_adapter = bt832_probe,
238 237 .detach_client = bt832_detach,
239 238 .command = bt832_command,
drivers/media/video/bt856.c
... ... @@ -409,7 +409,6 @@
409 409 .name = "bt856",
410 410  
411 411 .id = I2C_DRIVERID_BT856,
412   - .flags = I2C_DF_NOTIFY,
413 412  
414 413 .attach_adapter = bt856_attach_adapter,
415 414 .detach_client = bt856_detach_client,
drivers/media/video/cs53l32a.c
... ... @@ -218,7 +218,6 @@
218 218 static struct i2c_driver i2c_driver = {
219 219 .name = "cs53l32a",
220 220 .id = I2C_DRIVERID_CS53L32A,
221   - .flags = I2C_DF_NOTIFY,
222 221 .attach_adapter = cs53l32a_probe,
223 222 .detach_client = cs53l32a_detach,
224 223 .command = cs53l32a_command,
drivers/media/video/cx25840/cx25840-core.c
... ... @@ -847,7 +847,6 @@
847 847 .name = "cx25840",
848 848  
849 849 .id = I2C_DRIVERID_CX25840,
850   - .flags = I2C_DF_NOTIFY,
851 850  
852 851 .attach_adapter = cx25840_attach_adapter,
853 852 .detach_client = cx25840_detach_client,
drivers/media/video/indycam.c
... ... @@ -454,7 +454,6 @@
454 454 .owner = THIS_MODULE,
455 455 .name = "indycam",
456 456 .id = I2C_DRIVERID_INDYCAM,
457   - .flags = I2C_DF_NOTIFY,
458 457 .attach_adapter = indycam_probe,
459 458 .detach_client = indycam_detach,
460 459 .command = indycam_command,
drivers/media/video/ir-kbd-i2c.c
... ... @@ -280,7 +280,6 @@
280 280 static struct i2c_driver driver = {
281 281 .name = "ir remote kbd driver",
282 282 .id = I2C_DRIVERID_INFRARED,
283   - .flags = I2C_DF_NOTIFY,
284 283 .attach_adapter = ir_probe,
285 284 .detach_client = ir_detach,
286 285 };
drivers/media/video/msp3400.c
... ... @@ -1564,7 +1564,6 @@
1564 1564 .owner = THIS_MODULE,
1565 1565 .name = "msp3400",
1566 1566 .id = I2C_DRIVERID_MSP3400,
1567   - .flags = I2C_DF_NOTIFY,
1568 1567 .attach_adapter = msp_probe,
1569 1568 .detach_client = msp_detach,
1570 1569 .command = msp_command,
drivers/media/video/ovcamchip/ovcamchip_core.c
... ... @@ -414,7 +414,6 @@
414 414 .name = "ovcamchip",
415 415 .id = I2C_DRIVERID_OVCAMCHIP,
416 416 .class = I2C_CLASS_CAM_DIGITAL,
417   - .flags = I2C_DF_NOTIFY,
418 417 .attach_adapter = ovcamchip_attach,
419 418 .detach_client = ovcamchip_detach,
420 419 .command = ovcamchip_command,
drivers/media/video/saa5246a.c
... ... @@ -166,7 +166,6 @@
166 166 .owner = THIS_MODULE,
167 167 .name = IF_NAME, /* name */
168 168 .id = I2C_DRIVERID_SAA5249, /* in i2c.h */
169   - .flags = I2C_DF_NOTIFY,
170 169 .attach_adapter = saa5246a_probe,
171 170 .detach_client = saa5246a_detach,
172 171 .command = saa5246a_command
drivers/media/video/saa5249.c
... ... @@ -239,7 +239,6 @@
239 239 .owner = THIS_MODULE,
240 240 .name = IF_NAME, /* name */
241 241 .id = I2C_DRIVERID_SAA5249, /* in i2c.h */
242   - .flags = I2C_DF_NOTIFY,
243 242 .attach_adapter = saa5249_probe,
244 243 .detach_client = saa5249_detach,
245 244 .command = saa5249_command
drivers/media/video/saa6588.c
... ... @@ -498,7 +498,6 @@
498 498 .owner = THIS_MODULE,
499 499 .name = "i2c saa6588 driver",
500 500 .id = -1, /* FIXME */
501   - .flags = I2C_DF_NOTIFY,
502 501 .attach_adapter = saa6588_probe,
503 502 .detach_client = saa6588_detach,
504 503 .command = saa6588_command,
drivers/media/video/saa7110.c
... ... @@ -591,7 +591,6 @@
591 591 .name = "saa7110",
592 592  
593 593 .id = I2C_DRIVERID_SAA7110,
594   - .flags = I2C_DF_NOTIFY,
595 594  
596 595 .attach_adapter = saa7110_attach_adapter,
597 596 .detach_client = saa7110_detach_client,
drivers/media/video/saa7111.c
... ... @@ -594,7 +594,6 @@
594 594 .name = "saa7111",
595 595  
596 596 .id = I2C_DRIVERID_SAA7111A,
597   - .flags = I2C_DF_NOTIFY,
598 597  
599 598 .attach_adapter = saa7111_attach_adapter,
600 599 .detach_client = saa7111_detach_client,
drivers/media/video/saa7114.c
... ... @@ -1208,7 +1208,6 @@
1208 1208 .name = "saa7114",
1209 1209  
1210 1210 .id = I2C_DRIVERID_SAA7114,
1211   - .flags = I2C_DF_NOTIFY,
1212 1211  
1213 1212 .attach_adapter = saa7114_attach_adapter,
1214 1213 .detach_client = saa7114_detach_client,
drivers/media/video/saa7115.c
... ... @@ -1356,7 +1356,6 @@
1356 1356 static struct i2c_driver i2c_driver_saa7115 = {
1357 1357 .name = "saa7115",
1358 1358 .id = I2C_DRIVERID_SAA711X,
1359   - .flags = I2C_DF_NOTIFY,
1360 1359 .attach_adapter = saa7115_probe,
1361 1360 .detach_client = saa7115_detach,
1362 1361 .command = saa7115_command,
drivers/media/video/saa711x.c
... ... @@ -569,7 +569,6 @@
569 569 .name = "saa711x",
570 570  
571 571 .id = I2C_DRIVERID_SAA711X,
572   - .flags = I2C_DF_NOTIFY,
573 572  
574 573 .attach_adapter = saa711x_attach_adapter,
575 574 .detach_client = saa711x_detach_client,
drivers/media/video/saa7127.c
... ... @@ -821,7 +821,6 @@
821 821 static struct i2c_driver i2c_driver_saa7127 = {
822 822 .name = "saa7127",
823 823 .id = I2C_DRIVERID_SAA7127,
824   - .flags = I2C_DF_NOTIFY,
825 824 .attach_adapter = saa7127_probe,
826 825 .detach_client = saa7127_detach,
827 826 .command = saa7127_command,
drivers/media/video/saa7134/saa6752hs.c
... ... @@ -600,7 +600,6 @@
600 600 .owner = THIS_MODULE,
601 601 .name = "i2c saa6752hs MPEG encoder",
602 602 .id = I2C_DRIVERID_SAA6752HS,
603   - .flags = I2C_DF_NOTIFY,
604 603 .attach_adapter = saa6752hs_probe,
605 604 .detach_client = saa6752hs_detach,
606 605 .command = saa6752hs_command,
drivers/media/video/saa7185.c
... ... @@ -491,7 +491,6 @@
491 491 .name = "saa7185", /* name */
492 492  
493 493 .id = I2C_DRIVERID_SAA7185B,
494   - .flags = I2C_DF_NOTIFY,
495 494  
496 495 .attach_adapter = saa7185_attach_adapter,
497 496 .detach_client = saa7185_detach_client,
drivers/media/video/saa7191.c
... ... @@ -791,7 +791,6 @@
791 791 .owner = THIS_MODULE,
792 792 .name = "saa7191",
793 793 .id = I2C_DRIVERID_SAA7191,
794   - .flags = I2C_DF_NOTIFY,
795 794 .attach_adapter = saa7191_probe,
796 795 .detach_client = saa7191_detach,
797 796 .command = saa7191_command
drivers/media/video/tda7432.c
... ... @@ -504,7 +504,6 @@
504 504 .owner = THIS_MODULE,
505 505 .name = "i2c tda7432 driver",
506 506 .id = I2C_DRIVERID_TDA7432,
507   - .flags = I2C_DF_NOTIFY,
508 507 .attach_adapter = tda7432_probe,
509 508 .detach_client = tda7432_detach,
510 509 .command = tda7432_command,
drivers/media/video/tda9840.c
... ... @@ -224,7 +224,6 @@
224 224 .owner = THIS_MODULE,
225 225 .name = "tda9840",
226 226 .id = I2C_DRIVERID_TDA9840,
227   - .flags = I2C_DF_NOTIFY,
228 227 .attach_adapter = attach,
229 228 .detach_client = detach,
230 229 .command = command,
drivers/media/video/tda9875.c
... ... @@ -375,7 +375,6 @@
375 375 .owner = THIS_MODULE,
376 376 .name = "i2c tda9875 driver",
377 377 .id = I2C_DRIVERID_TDA9875,
378   - .flags = I2C_DF_NOTIFY,
379 378 .attach_adapter = tda9875_probe,
380 379 .detach_client = tda9875_detach,
381 380 .command = tda9875_command,
drivers/media/video/tda9887.c
... ... @@ -822,7 +822,6 @@
822 822 .owner = THIS_MODULE,
823 823 .name = "i2c tda9887 driver",
824 824 .id = -1, /* FIXME */
825   - .flags = I2C_DF_NOTIFY,
826 825 .attach_adapter = tda9887_probe,
827 826 .detach_client = tda9887_detach,
828 827 .command = tda9887_command,
drivers/media/video/tea6415c.c
... ... @@ -193,7 +193,6 @@
193 193 .owner = THIS_MODULE,
194 194 .name = "tea6415c",
195 195 .id = I2C_DRIVERID_TEA6415C,
196   - .flags = I2C_DF_NOTIFY,
197 196 .attach_adapter = attach,
198 197 .detach_client = detach,
199 198 .command = command,
drivers/media/video/tea6420.c
... ... @@ -170,7 +170,6 @@
170 170 .owner = THIS_MODULE,
171 171 .name = "tea6420",
172 172 .id = I2C_DRIVERID_TEA6420,
173   - .flags = I2C_DF_NOTIFY,
174 173 .attach_adapter = attach,
175 174 .detach_client = detach,
176 175 .command = command,
drivers/media/video/tuner-3036.c
... ... @@ -178,7 +178,6 @@
178 178 .owner = THIS_MODULE,
179 179 .name = "sab3036",
180 180 .id = I2C_DRIVERID_SAB3036,
181   - .flags = I2C_DF_NOTIFY,
182 181 .attach_adapter = tuner_probe,
183 182 .detach_client = tuner_detach,
184 183 .command = tuner_command
drivers/media/video/tuner-core.c
... ... @@ -745,7 +745,6 @@
745 745 .owner = THIS_MODULE,
746 746 .name = "tuner",
747 747 .id = I2C_DRIVERID_TUNER,
748   - .flags = I2C_DF_NOTIFY,
749 748 .attach_adapter = tuner_probe,
750 749 .detach_client = tuner_detach,
751 750 .command = tuner_command,
drivers/media/video/tvaudio.c
... ... @@ -1705,7 +1705,6 @@
1705 1705 .owner = THIS_MODULE,
1706 1706 .name = "generic i2c audio driver",
1707 1707 .id = I2C_DRIVERID_TVAUDIO,
1708   - .flags = I2C_DF_NOTIFY,
1709 1708 .attach_adapter = chip_probe,
1710 1709 .detach_client = chip_detach,
1711 1710 .command = chip_command,
drivers/media/video/tveeprom.c
... ... @@ -782,7 +782,6 @@
782 782 .owner = THIS_MODULE,
783 783 .name = "tveeprom",
784 784 .id = I2C_DRIVERID_TVEEPROM,
785   - .flags = I2C_DF_NOTIFY,
786 785 .attach_adapter = tveeprom_attach_adapter,
787 786 .detach_client = tveeprom_detach_client,
788 787 .command = tveeprom_command,
drivers/media/video/tvmixer.c
... ... @@ -232,7 +232,6 @@
232 232 #endif
233 233 .name = "tv card mixer driver",
234 234 .id = I2C_DRIVERID_TVMIXER,
235   - .flags = I2C_DF_NOTIFY,
236 235 .detach_adapter = tvmixer_adapters,
237 236 .attach_adapter = tvmixer_adapters,
238 237 .detach_client = tvmixer_clients,
drivers/media/video/tvp5150.c
... ... @@ -806,7 +806,6 @@
806 806  
807 807 /* FIXME */
808 808 .id = I2C_DRIVERID_SAA7110,
809   - .flags = I2C_DF_NOTIFY,
810 809  
811 810 .attach_adapter = tvp5150_attach_adapter,
812 811 .detach_client = tvp5150_detach_client,
drivers/media/video/vpx3220.c
... ... @@ -726,7 +726,6 @@
726 726 .name = "vpx3220",
727 727  
728 728 .id = I2C_DRIVERID_VPX3220,
729   - .flags = I2C_DF_NOTIFY,
730 729  
731 730 .attach_adapter = vpx3220_attach_adapter,
732 731 .detach_client = vpx3220_detach_client,
drivers/media/video/wm8775.c
... ... @@ -236,7 +236,6 @@
236 236 .name = "wm8775",
237 237  
238 238 .id = I2C_DRIVERID_WM8775,
239   - .flags = I2C_DF_NOTIFY,
240 239  
241 240 .attach_adapter = wm8775_probe,
242 241 .detach_client = wm8775_detach,
drivers/video/matrox/matroxfb_maven.c
... ... @@ -1296,7 +1296,6 @@
1296 1296 .owner = THIS_MODULE,
1297 1297 .name = "maven",
1298 1298 .id = I2C_DRIVERID_MGATVO,
1299   - .flags = I2C_DF_NOTIFY,
1300 1299 .attach_adapter = maven_attach_adapter,
1301 1300 .detach_client = maven_detach_client,
1302 1301 .command = maven_command,
... ... @@ -251,7 +251,6 @@
251 251 }
252 252  
253 253 /*flags for the driver struct: */
254   -#define I2C_DF_NOTIFY 0x01 /* notify on bus (de/a)ttaches */
255 254  
256 255 /*flags for the client struct: */
257 256 #define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */
sound/oss/dmasound/dac3550a.c
... ... @@ -44,7 +44,6 @@
44 44 .owner = THIS_MODULE,
45 45 .name = "DAC3550A driver V " DACA_VERSION,
46 46 .id = I2C_DRIVERID_DACA,
47   - .flags = I2C_DF_NOTIFY,
48 47 .attach_adapter = daca_attach_adapter,
49 48 .detach_client = daca_detach_client,
50 49 };
sound/oss/dmasound/tas_common.c
... ... @@ -49,7 +49,6 @@
49 49 struct i2c_driver tas_driver = {
50 50 .owner = THIS_MODULE,
51 51 .name = "tas",
52   - .flags = I2C_DF_NOTIFY,
53 52 .attach_adapter = tas_attach_adapter,
54 53 .detach_client = tas_detach_client,
55 54 };
... ... @@ -43,7 +43,6 @@
43 43 struct i2c_driver keywest_driver = {
44 44 .name = "PMac Keywest Audio",
45 45 .id = I2C_DRIVERID_KEYWEST,
46   - .flags = I2C_DF_NOTIFY,
47 46 .attach_adapter = &keywest_attach_adapter,
48 47 .detach_client = &keywest_detach_client,
49 48 };