aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7185.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-04-02 13:31:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-22 00:51:48 -0400
commitb3d5496ea5915fa4848fe307af9f7097f312e932 (patch)
treee358977311df194ebac13d57c5e8abf1a87bd65c /drivers/media/video/saa7185.c
parent2a5a68b840cbab31baab2d9b2e1e6de3b289ae1e (diff)
[PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers
Some months ago, you killed the address ranges mechanism from all sensors i2c chip drivers (both the module parameters and the in-code address lists). I think it was a very good move, as the ranges can easily be replaced by individual addresses, and this allowed for significant cleanups in the i2c core (let alone the impressive size shrink for all these drivers). Unfortunately you did not do the same for non-sensors i2c chip drivers. These need the address ranges even less, so we could get rid of the ranges here as well for another significant i2c core cleanup. Here comes a patch which does just that. Since the process is exactly the same as what you did for the other drivers set already, I did not split this one in parts. A documentation update is included. The change saves 308 bytes in the i2c core, and an average 1382 bytes for chip drivers which use I2C_CLIENT_INSMOD, 126 bytes for those which do not. This change is required if we want to merge the sensors and non-sensors i2c code (and we want to do this). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/Documentation/i2c/writing-clients ===================================================================
Diffstat (limited to 'drivers/media/video/saa7185.c')
-rw-r--r--drivers/media/video/saa7185.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c
index 5f0b224c3cb6..5c623fadc8fe 100644
--- a/drivers/media/video/saa7185.c
+++ b/drivers/media/video/saa7185.c
@@ -380,21 +380,15 @@ saa7185_command (struct i2c_client *client,
380 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' 380 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
381 */ 381 */
382static unsigned short normal_i2c[] = { I2C_SAA7185 >> 1, I2C_CLIENT_END }; 382static unsigned short normal_i2c[] = { I2C_SAA7185 >> 1, I2C_CLIENT_END };
383static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
384 383
385static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; 384static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
386static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
387static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END }; 385static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
388static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
389static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END }; 386static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
390 387
391static struct i2c_client_address_data addr_data = { 388static struct i2c_client_address_data addr_data = {
392 .normal_i2c = normal_i2c, 389 .normal_i2c = normal_i2c,
393 .normal_i2c_range = normal_i2c_range,
394 .probe = probe, 390 .probe = probe,
395 .probe_range = probe_range,
396 .ignore = ignore, 391 .ignore = ignore,
397 .ignore_range = ignore_range,
398 .force = force 392 .force = force
399}; 393};
400 394