From 9fc6adfa9adf2be84119a3c2592287f33bd1dff2 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 31 Jul 2005 21:20:43 +0200 Subject: [PATCH] hwmon: hwmon vs i2c, second round (01/11) Add support for kind-forced addresses to i2c_probe, like i2c_detect has for (essentially) hardware monitoring drivers. Note that this change will slightly increase the size of the drivers using I2C_CLIENT_INSMOD, with no immediate benefit. This is a requirement if we want to merge i2c_probe and i2c_detect though, and seems a reasonable price to pay in comparison with the previous cleanups which saved much more than that (such as the i2c-isa cleanup or the i2c address ranges removal.) Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- include/linux/i2c.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ad1c0fb164b..9419bc5584a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -48,7 +48,6 @@ struct i2c_algorithm; struct i2c_adapter; struct i2c_client; struct i2c_driver; -struct i2c_client_address_data; union i2c_smbus_data; /* @@ -301,7 +300,7 @@ struct i2c_client_address_data { unsigned short *normal_i2c; unsigned short *probe; unsigned short *ignore; - unsigned short *force; + unsigned short **forces; }; /* Internal numbers to terminate lists */ @@ -575,11 +574,15 @@ union i2c_smbus_data { I2C_CLIENT_MODULE_PARM(force, \ "List of adapter,address pairs to boldly assume " \ "to be present"); \ + static unsigned short *addr_forces[] = { \ + force, \ + NULL \ + }; \ static struct i2c_client_address_data addr_data = { \ .normal_i2c = normal_i2c, \ .probe = probe, \ .ignore = ignore, \ - .force = force, \ + .forces = addr_forces, \ } #endif /* _LINUX_I2C_H */ -- cgit v1.2.3