i2c: Get rid of struct i2c_client_address_data
authorJean Delvare <khali@linux-fr.org>
Mon, 14 Dec 2009 20:17:25 +0000 (21:17 +0100)
committerJean Delvare <khali@linux-fr.org>
Mon, 14 Dec 2009 20:17:25 +0000 (21:17 +0100)
Struct i2c_client_address_data only contains one field at this point,
which makes its usefulness questionable. Get rid of it and pass simple
address lists around instead.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
50 files changed:
Documentation/i2c/writing-clients
drivers/hwmon/adm1021.c
drivers/hwmon/adm1025.c
drivers/hwmon/adm1026.c
drivers/hwmon/adm1029.c
drivers/hwmon/adm1031.c
drivers/hwmon/adm9240.c
drivers/hwmon/ads7828.c
drivers/hwmon/adt7462.c
drivers/hwmon/adt7470.c
drivers/hwmon/adt7473.c
drivers/hwmon/adt7475.c
drivers/hwmon/asb100.c
drivers/hwmon/atxp1.c
drivers/hwmon/dme1737.c
drivers/hwmon/ds1621.c
drivers/hwmon/f75375s.c
drivers/hwmon/fschmd.c
drivers/hwmon/gl518sm.c
drivers/hwmon/gl520sm.c
drivers/hwmon/lm63.c
drivers/hwmon/lm73.c
drivers/hwmon/lm75.c
drivers/hwmon/lm77.c
drivers/hwmon/lm78.c
drivers/hwmon/lm80.c
drivers/hwmon/lm83.c
drivers/hwmon/lm85.c
drivers/hwmon/lm87.c
drivers/hwmon/lm90.c
drivers/hwmon/lm92.c
drivers/hwmon/lm93.c
drivers/hwmon/lm95241.c
drivers/hwmon/max1619.c
drivers/hwmon/max6650.c
drivers/hwmon/pcf8591.c
drivers/hwmon/smsc47m192.c
drivers/hwmon/thmc50.c
drivers/hwmon/tmp401.c
drivers/hwmon/tmp421.c
drivers/hwmon/w83781d.c
drivers/hwmon/w83791d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83793.c
drivers/hwmon/w83l785ts.c
drivers/hwmon/w83l786ng.c
drivers/i2c/i2c-core.c
drivers/misc/eeprom/eeprom.c
drivers/misc/ics932s401.c
include/linux/i2c.h

index 7860aafb483dfba05aea315fce424ff6b6d936cb..0a74603eb671c84590b0a91976cc2ea3e0150728 100644 (file)
@@ -44,7 +44,7 @@ static struct i2c_driver foo_driver = {
        /* if device autodetection is needed: */
        .class          = I2C_CLASS_SOMETHING,
        .detect         = foo_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 
        .shutdown       = foo_shutdown, /* optional */
        .suspend        = foo_suspend,  /* optional */
index 3ebcdd9c25a5357dbaa7fd8c59e6eaa876d62c9c..d7af039a4d430aa779eb7ff032fddd90dfaf71cf 100644 (file)
@@ -130,7 +130,7 @@ static struct i2c_driver adm1021_driver = {
        .remove         = adm1021_remove,
        .id_table       = adm1021_id,
        .detect         = adm1021_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static ssize_t show_temp(struct device *dev,
index 357c9ffa147e35ae0a476189c826accdbc9b0f9e..e17651083b0922ba734d86f26621bcb1ea7d25b7 100644 (file)
@@ -137,7 +137,7 @@ static struct i2c_driver adm1025_driver = {
        .remove         = adm1025_remove,
        .id_table       = adm1025_id,
        .detect         = adm1025_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 8deb17a402da65dd9c62a56714901a834a8cc6d3..85bf23aea7dbe3b85607f2dc04860ad8f3d25012 100644 (file)
@@ -319,7 +319,7 @@ static struct i2c_driver adm1026_driver = {
        .remove         = adm1026_remove,
        .id_table       = adm1026_id,
        .detect         = adm1026_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int adm1026_read_value(struct i2c_client *client, u8 reg)
index 9bc9dbcacdbd217541a993c0707218c53bbd547e..a006ae5fbd2ba9c7d5b9da40822069b116bba28e 100644 (file)
@@ -142,7 +142,7 @@ static struct i2c_driver adm1029_driver = {
        .remove         = adm1029_remove,
        .id_table       = adm1029_id,
        .detect         = adm1029_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index cebfbf6926da136c1cf5c4ad53520178330019e1..1e02799b870ec3d95a80efd515cbf6fd4014af23 100644 (file)
@@ -125,7 +125,7 @@ static struct i2c_driver adm1031_driver = {
        .remove         = adm1031_remove,
        .id_table       = adm1031_id,
        .detect         = adm1031_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg)
index 9316e074d6902661a102d2b9602dac226e876e9a..d9942e74ed4a34733f0778b2aa2377acac2daa7b 100644 (file)
@@ -156,7 +156,7 @@ static struct i2c_driver adm9240_driver = {
        .remove         = adm9240_remove,
        .id_table       = adm9240_id,
        .detect         = adm9240_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* per client data */
index b50893111532f31b5523003e642f0aa3c7ae5c74..3827ce4be071e01c30fe2c032b033cf8909b389b 100644 (file)
@@ -183,7 +183,7 @@ static struct i2c_driver ads7828_driver = {
        .remove = ads7828_remove,
        .id_table = ads7828_id,
        .detect = ads7828_detect,
-       .address_data = &addr_data,
+       .address_list = normal_i2c,
 };
 
 /* Return 0 if detection is successful, -ENODEV otherwise */
index 30cf002c677f7f0c8242feb67afc6c1372d31f03..325700428ef0bd46571c9764464a558a1ce7587b 100644 (file)
@@ -256,7 +256,7 @@ static struct i2c_driver adt7462_driver = {
        .remove         = adt7462_remove,
        .id_table       = adt7462_id,
        .detect         = adt7462_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 9ffe5c6e495d0666a4bf1c894e7516f88fa774c9..33aa0fa3e9906dba5f1e27e0cebe0ec9cf90c69d 100644 (file)
@@ -196,7 +196,7 @@ static struct i2c_driver adt7470_driver = {
        .remove         = adt7470_remove,
        .id_table       = adt7470_id,
        .detect         = adt7470_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 78fadaa431e2d95c093d082e833160c5b105a88b..1535733ddf19e0f75b6e45bb1a4dece5de36bf08 100644 (file)
@@ -184,7 +184,7 @@ static struct i2c_driver adt7473_driver = {
        .remove         = adt7473_remove,
        .id_table       = adt7473_id,
        .detect         = adt7473_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 3c0571551a9fc11e11647f68471608326be521bc..1fb8940428c68c682dd14a2abdba008ddc19385f 100644 (file)
@@ -1412,7 +1412,7 @@ static struct i2c_driver adt7475_driver = {
        .remove         = adt7475_remove,
        .id_table       = adt7475_id,
        .detect         = adt7475_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static void adt7475_read_hystersis(struct i2c_client *client)
index 507e116d5456f042a33b29e72080f3f08bb31f09..a92512a4a366518e7d62d1d63b3eda39355af9fd 100644 (file)
@@ -230,7 +230,7 @@ static struct i2c_driver asb100_driver = {
        .remove         = asb100_remove,
        .id_table       = asb100_id,
        .detect         = asb100_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* 7 Voltages */
index 6b7459745b66bb5da78d9538d8b7c20b8b7cc2ab..b0c3051d8a4fc0ae8818a541841d046b2b1f88de 100644 (file)
@@ -67,7 +67,7 @@ static struct i2c_driver atxp1_driver = {
        .remove         = atxp1_remove,
        .id_table       = atxp1_id,
        .detect         = atxp1_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 struct atxp1_data {
index 7024617c11946a8ba4332a446f32956487902a6e..a3af09f9dbade83b3bcd83a89e4ad2f11937a4c7 100644 (file)
@@ -2318,7 +2318,7 @@ static struct i2c_driver dme1737_i2c_driver = {
        .remove = dme1737_i2c_remove,
        .id_table = dme1737_id,
        .detect = dme1737_i2c_detect,
-       .address_data = &addr_data,
+       .address_list = normal_i2c,
 };
 
 /* ---------------------------------------------------------------------
index 5fde2f5139fd1f8077d360711110c3037dd298d0..dfa4329090d441073595bfc139b4194010bcfed4 100644 (file)
@@ -321,7 +321,7 @@ static struct i2c_driver ds1621_driver = {
        .remove         = ds1621_remove,
        .id_table       = ds1621_id,
        .detect         = ds1621_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init ds1621_init(void)
index 2ffcf56b6f4ec39c49013efcdf8bf87acb4d05bf..f8992c9356664944c20bbb8adfe44ac2ea19a9d3 100644 (file)
@@ -135,7 +135,7 @@ static struct i2c_driver f75375_driver = {
        .remove = f75375_remove,
        .id_table = f75375_id,
        .detect = f75375_detect,
-       .address_data = &addr_data,
+       .address_list = normal_i2c,
 };
 
 static inline int f75375_read8(struct i2c_client *client, u8 reg)
index bce18e0f1d61ed3917666d29ceafb644e4571f5f..4eebbbeba2d1b9c70132bf610e020a5ef978f32c 100644 (file)
@@ -251,7 +251,7 @@ static struct i2c_driver fschmd_driver = {
        .remove         = fschmd_remove,
        .id_table       = fschmd_id,
        .detect         = fschmd_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 34f83c6a3f45a43d8b07db045b2c4b105ade6992..e9407acd72cbe2a12174e5caa6c41496d756e1f3 100644 (file)
@@ -162,7 +162,7 @@ static struct i2c_driver gl518_driver = {
        .remove         = gl518_remove,
        .id_table       = gl518_id,
        .detect         = gl518_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index d03ba692fc4265063699ebd5716631520540a9a7..c0ec8c28731edba27b859ff615959ca483f49eef 100644 (file)
@@ -104,7 +104,7 @@ static struct i2c_driver gl520_driver = {
        .remove         = gl520_remove,
        .id_table       = gl520_id,
        .detect         = gl520_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* Client data */
index 26844fc4a66d438b27ae67c34c27372c5037e1a8..1426a455071cbbd30f6e4ad55290b6213079a0bc 100644 (file)
@@ -156,7 +156,7 @@ static struct i2c_driver lm63_driver = {
        .remove         = lm63_remove,
        .id_table       = lm63_id,
        .detect         = lm63_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index e610da9bd80cb54c17d181c3344e915977d94dd7..fb6ab9a9a60880c0ead94d52d2521548b0d36cde 100644 (file)
@@ -182,7 +182,7 @@ static struct i2c_driver lm73_driver = {
        .remove         = lm73_remove,
        .id_table       = lm73_ids,
        .detect         = lm73_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* module glue */
index 8fd759d28ddf9f8472c5bf5060297d2f9f22f1bf..ce2423cd8198e67d7892166d7f119c26b20ecd23 100644 (file)
@@ -295,7 +295,7 @@ static struct i2c_driver lm75_driver = {
        .remove         = lm75_remove,
        .id_table       = lm75_ids,
        .detect         = lm75_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*-----------------------------------------------------------------------*/
index 6373ab2cd9526fc98ee694ecf3f150f00069abbd..b6105e570b0ee870ec054fdca559a38f8c8d3c5f 100644 (file)
@@ -91,7 +91,7 @@ static struct i2c_driver lm77_driver = {
        .remove         = lm77_remove,
        .id_table       = lm77_id,
        .detect         = lm77_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* straight from the datasheet */
index f58850a9d9e021be6d489e3d1c4ff51acbe74936..cd6a9ea921f6ad4a819e374c5139f2c78d4d8f95 100644 (file)
@@ -173,7 +173,7 @@ static struct i2c_driver lm78_driver = {
        .remove         = lm78_i2c_remove,
        .id_table       = lm78_i2c_id,
        .detect         = lm78_i2c_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static struct platform_driver lm78_isa_driver = {
index e3222f3d4a5ec6824896037a0c9198f3fd407496..1cf5ff5bfa43f1cad0fbd0f9b8bec3c6d5170293 100644 (file)
@@ -159,7 +159,7 @@ static struct i2c_driver lm80_driver = {
        .remove         = lm80_remove,
        .id_table       = lm80_id,
        .detect         = lm80_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index bfb7477cb6b37bba6e01614b381256d3ec347c86..b80ae182f851cd2e9304a28d34a6eac57cf47446 100644 (file)
@@ -145,7 +145,7 @@ static struct i2c_driver lm83_driver = {
        .remove         = lm83_remove,
        .id_table       = lm83_id,
        .detect         = lm83_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index f5fc45ac6fe5a45c36e7bc3e4300448678d15dea..d29bd34a265ee3497b45dc6645a7b06e9f30c62c 100644 (file)
@@ -356,7 +356,7 @@ static struct i2c_driver lm85_driver = {
        .remove         = lm85_remove,
        .id_table       = lm85_id,
        .detect         = lm85_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 
index d545b8596b05000c0da3f92afbb79df0fa4b6e4c..60d34bc578cbaf98f98d6649cde8a57526f9e5bc 100644 (file)
@@ -184,7 +184,7 @@ static struct i2c_driver lm87_driver = {
        .remove         = lm87_remove,
        .id_table       = lm87_id,
        .detect         = lm87_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 3acbacadac77bff944c96bbf0c40e417745ec950..3e916ac97ea8a8b4d55e337d21bce4d449b9ffd2 100644 (file)
@@ -191,7 +191,7 @@ static struct i2c_driver lm90_driver = {
        .remove         = lm90_remove,
        .id_table       = lm90_id,
        .detect         = lm90_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index da354222468dc9f018e9ad3dd2d6fffac47ca570..b582b3b7fdee0c3597ecb18631cb860c002ba08d 100644 (file)
@@ -416,7 +416,7 @@ static struct i2c_driver lm92_driver = {
        .remove         = lm92_remove,
        .id_table       = lm92_id,
        .detect         = lm92_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init sensors_lm92_init(void)
index 7b9c97b72eb891b018fc4c74d19107eca2b9c103..d160dfdb513f5d35c483535345abb510b7d11e26 100644 (file)
@@ -2616,7 +2616,7 @@ static struct i2c_driver lm93_driver = {
        .remove         = lm93_remove,
        .id_table       = lm93_id,
        .detect         = lm93_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init lm93_init(void)
index 05ede4137e22340bd4c279227b017caa242d6720..55e3bfd497067161c1c4d5f33e8d3fe01ad997a6 100644 (file)
@@ -460,7 +460,7 @@ static struct i2c_driver lm95241_driver = {
        .remove         = lm95241_remove,
        .id_table       = lm95241_id,
        .detect         = lm95241_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init sensors_lm95241_init(void)
index 4baf94efd3726d11bfe2636820558cd5917281c2..94cea29f157b3d965ff7519930f6e5470191df42 100644 (file)
@@ -113,7 +113,7 @@ static struct i2c_driver max1619_driver = {
        .remove         = max1619_remove,
        .id_table       = max1619_id,
        .detect         = max1619_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index fd5d1acfcc953462341459b0d5c198b1fb5d0655..c7c126cf22dd0004c0f735acce0fa4bc8715484e 100644 (file)
@@ -141,7 +141,7 @@ static struct i2c_driver max6650_driver = {
        .remove         = max6650_remove,
        .id_table       = max6650_id,
        .detect         = max6650_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 4355aada01f2729ecc3770b9fa4d27c7b3b35664..c19e61bd393c0a74bf93d6a0105c60d99bf939b3 100644 (file)
@@ -299,7 +299,7 @@ static struct i2c_driver pcf8591_driver = {
 
        .class          = I2C_CLASS_HWMON,      /* Nearest choice */
        .detect         = pcf8591_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init pcf8591_init(void)
index 1683fc76759f479083c4dcb1857111b8821d5eff..34df2e2ee28ab107e504b66b5319eb6b3279c4f7 100644 (file)
@@ -135,7 +135,7 @@ static struct i2c_driver smsc47m192_driver = {
        .remove         = smsc47m192_remove,
        .id_table       = smsc47m192_id,
        .detect         = smsc47m192_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* Voltages */
index 02ac0d4323a4a2807bed50bba156ca3c5298e8a5..866d66507596578407d009f4bd1414ab74160f7f 100644 (file)
@@ -108,7 +108,7 @@ static struct i2c_driver thmc50_driver = {
        .remove = thmc50_remove,
        .id_table = thmc50_id,
        .detect = thmc50_detect,
-       .address_data = &addr_data,
+       .address_list = normal_i2c,
 };
 
 static ssize_t show_analog_out(struct device *dev,
index 7cf1d541a5fab5cb16497fe8e3cdc1eaddd47ab2..ed086491cc9af9090daee76907c1b1caccb90f5c 100644 (file)
@@ -123,7 +123,7 @@ static struct i2c_driver tmp401_driver = {
        .remove         = tmp401_remove,
        .id_table       = tmp401_id,
        .detect         = tmp401_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 34eb34c548ff0e7b422bc1fca531630b4450b302..018ad028c179ea3903cd3ee3ef696be2f33878df 100644 (file)
@@ -322,7 +322,7 @@ static struct i2c_driver tmp421_driver = {
        .remove = tmp421_remove,
        .id_table = tmp421_id,
        .detect = tmp421_detect,
-       .address_data = &addr_data,
+       .address_list = normal_i2c,
 };
 
 static int __init tmp421_init(void)
index 44704d2dee6363427a9fa3e42062ca5bdb0e6646..bfaa888f6e47347cd7f04bea948e2797a9858120 100644 (file)
@@ -1536,7 +1536,7 @@ static struct i2c_driver w83781d_driver = {
        .remove         = w83781d_remove,
        .id_table       = w83781d_ids,
        .detect         = w83781d_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index b3e91b6e651af6abe2ce4a2933bb409c7d18351d..e059cf0471b0f792c9381f050ae7410f02dec197 100644 (file)
@@ -355,7 +355,7 @@ static struct i2c_driver w83791d_driver = {
        .remove         = w83791d_remove,
        .id_table       = w83791d_id,
        .detect         = w83791d_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /* following are the sysfs callback functions */
index 03b836cdafa63f362927684967817e0d497d3819..c6f198a3d924b78c8c029a840010f6375d212d5a 100644 (file)
@@ -328,7 +328,7 @@ static struct i2c_driver w83792d_driver = {
        .remove         = w83792d_remove,
        .id_table       = w83792d_id,
        .detect         = w83792d_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static inline long in_count_from_reg(int nr, struct w83792d_data *data)
index acf35e6e2ab93afc2cadf7f84d5e421190193ab9..ed32b18fbc425f5bb26f69005f598e5c776dda7d 100644 (file)
@@ -252,7 +252,7 @@ static struct i2c_driver w83793_driver = {
        .remove         = w83793_remove,
        .id_table       = w83793_id,
        .detect         = w83793_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static ssize_t
index ec6e4b7fb74100e1f59b31989b9a4685e40b2172..81c59937cf0df27ffc7ca6ade7f51be3a239e96d 100644 (file)
@@ -108,7 +108,7 @@ static struct i2c_driver w83l785ts_driver = {
        .remove         = w83l785ts_remove,
        .id_table       = w83l785ts_id,
        .detect         = w83l785ts_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 /*
index 12a5fd67bee0aed3e29fa51b294a2f251d402180..a427347ae82b40e50ef8daf7d4ffa3152ad29b41 100644 (file)
@@ -168,7 +168,7 @@ static struct i2c_driver w83l786ng_driver = {
        .remove         = w83l786ng_remove,
        .id_table       = w83l786ng_id,
        .detect         = w83l786ng_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static u8
index c1047d644d8f99b0b655db11d09486be49155962..9065c7238b5ef5edff061e72daf38d8b5e98236b 100644 (file)
@@ -1214,13 +1214,13 @@ static int i2c_detect_address(struct i2c_client *temp_client,
 
 static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
 {
-       const struct i2c_client_address_data *address_data;
+       const unsigned short *address_list;
        struct i2c_client *temp_client;
        int i, err = 0;
        int adap_id = i2c_adapter_id(adapter);
 
-       address_data = driver->address_data;
-       if (!driver->detect || !address_data)
+       address_list = driver->address_list;
+       if (!driver->detect || !address_list)
                return 0;
 
        /* Set up a temporary client to help detect callback */
@@ -1235,7 +1235,7 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
 
        /* Stop here if we can't use SMBUS_QUICK */
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
-               if (address_data->normal_i2c[0] == I2C_CLIENT_END)
+               if (address_list[0] == I2C_CLIENT_END)
                        goto exit_free;
 
                dev_warn(&adapter->dev, "SMBus Quick command not supported, "
@@ -1244,11 +1244,10 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
                goto exit_free;
        }
 
-       for (i = 0; address_data->normal_i2c[i] != I2C_CLIENT_END; i += 1) {
+       for (i = 0; address_list[i] != I2C_CLIENT_END; i += 1) {
                dev_dbg(&adapter->dev, "found normal entry for adapter %d, "
-                       "addr 0x%02x\n", adap_id,
-                       address_data->normal_i2c[i]);
-               temp_client->addr = address_data->normal_i2c[i];
+                       "addr 0x%02x\n", adap_id, address_list[i]);
+               temp_client->addr = address_list[i];
                err = i2c_detect_address(temp_client, driver);
                if (err)
                        goto exit_free;
index 2c428f46453995576ed1c0306ef235b8a63994f7..3dc5e3db2c128191479f22da63e76d3e48075485 100644 (file)
@@ -232,7 +232,7 @@ static struct i2c_driver eeprom_driver = {
 
        .class          = I2C_CLASS_DDC | I2C_CLASS_SPD,
        .detect         = eeprom_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static int __init eeprom_init(void)
index 75097ec43edda1bb679108c8d721bc704f09efcb..d8a84718d687a1593e8cf00103423b7bd32a56f4 100644 (file)
@@ -125,7 +125,7 @@ static struct i2c_driver ics932s401_driver = {
        .remove         = ics932s401_remove,
        .id_table       = ics932s401_id,
        .detect         = ics932s401_detect,
-       .address_data   = &addr_data,
+       .address_list   = normal_i2c,
 };
 
 static struct ics932s401_data *ics932s401_update_device(struct device *dev)
index f6f2c080ba67073f739c16cdaa44b2a6d98f2475..fb9df1416ad589a9911799094f17b18d5e122691 100644 (file)
@@ -110,7 +110,7 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client,
  * @driver: Device driver model driver
  * @id_table: List of I2C devices supported by this driver
  * @detect: Callback for device detection
- * @address_data: The I2C addresses to probe (for detect)
+ * @address_list: The I2C addresses to probe (for detect)
  * @clients: List of detected clients we created (for i2c-core use only)
  *
  * The driver.owner field should be set to the module owner of this driver.
@@ -162,7 +162,7 @@ struct i2c_driver {
 
        /* Device detection callback for automatic device creation */
        int (*detect)(struct i2c_client *, struct i2c_board_info *);
-       const struct i2c_client_address_data *address_data;
+       const unsigned short *address_list;
        struct list_head clients;
 };
 #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
@@ -391,14 +391,6 @@ static inline void i2c_unlock_adapter(struct i2c_adapter *adapter)
 #define I2C_CLASS_DDC          (1<<3)  /* DDC bus on graphics adapters */
 #define I2C_CLASS_SPD          (1<<7)  /* SPD EEPROMs and similar */
 
-/* i2c_client_address_data is the struct for holding default client
- * addresses for a driver and for the parameters supplied on the
- * command line
- */
-struct i2c_client_address_data {
-       const unsigned short *normal_i2c;
-};
-
 /* Internal numbers to terminate lists */
 #define I2C_CLIENT_END         0xfffeU
 
@@ -610,48 +602,34 @@ union i2c_smbus_data {
   module_param_array(var, short, &var##_num, 0); \
   MODULE_PARM_DESC(var, desc)
 
-#define I2C_CLIENT_INSMOD_COMMON                                       \
-static const struct i2c_client_address_data addr_data = {              \
-       .normal_i2c     = normal_i2c,                                   \
-}
-
 /* These are the ones you want to use in your own drivers. Pick the one
    which matches the number of devices the driver differenciates between. */
-#define I2C_CLIENT_INSMOD                                              \
-I2C_CLIENT_INSMOD_COMMON
+#define I2C_CLIENT_INSMOD
 
 #define I2C_CLIENT_INSMOD_1(chip1)                                     \
-enum chips { any_chip, chip1 };                                                \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1 }
 
 #define I2C_CLIENT_INSMOD_2(chip1, chip2)                              \
-enum chips { any_chip, chip1, chip2 };                                 \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1, chip2 }
 
 #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3)                       \
-enum chips { any_chip, chip1, chip2, chip3 };                          \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1, chip2, chip3 }
 
 #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4)                        \
-enum chips { any_chip, chip1, chip2, chip3, chip4 };                   \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1, chip2, chip3, chip4 }
 
 #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5)         \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 };            \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }
 
 #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6)  \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 };     \
-I2C_CLIENT_INSMOD_COMMON
+enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }
 
 #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \
 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6,       \
-            chip7 };                                                   \
-I2C_CLIENT_INSMOD_COMMON
+            chip7 }
 
 #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \
 enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6,       \
-            chip7, chip8 };                                            \
-I2C_CLIENT_INSMOD_COMMON
+            chip7, chip8 }
 #endif /* __KERNEL__ */
 #endif /* _LINUX_I2C_H */