aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/ams/ams.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-10-17 17:51:12 +0200
committerJean Delvare <khali@mahadeva.delvare>2008-10-17 17:51:12 +0200
commit810ad7b62c0f075dc44ecc781b24c7f6ba388da5 (patch)
tree3ed66cd5359928823ba18eba05f575fd8c28a75e /drivers/hwmon/ams/ams.h
parent47064d645bc55863c7887a7c96cde39c9a37ee5f (diff)
hwmon: (ams) Convert to a new-style i2c driver
The legacy i2c binding model is phasing out, so the ams driver needs to be converted to a new-style i2c driver. Here is a naive approach of this conversion. Basically it is moving the i2c device creation from the ams driver to the i2c-powermac driver. This should work, but I suspect we could come up with something cleaner by declaring the i2c device as part of the platform setup. This could be done later by someone more familiar with openfirmware-based platforms than I am myself. One nice thing brought by this conversion is that the ams driver should be loaded automatically on systems where is is needed (at least when the I2C interface to the chip is used) providing coldplug-aware user-space environment. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/hwmon/ams/ams.h')
-rw-r--r--drivers/hwmon/ams/ams.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwmon/ams/ams.h b/drivers/hwmon/ams/ams.h
index 221ef6915a5..5ed387b0bd9 100644
--- a/drivers/hwmon/ams/ams.h
+++ b/drivers/hwmon/ams/ams.h
@@ -46,9 +46,7 @@ struct ams {
#ifdef CONFIG_SENSORS_AMS_I2C
/* I2C properties */
- int i2c_bus;
- int i2c_address;
- struct i2c_client i2c_client;
+ struct i2c_client *i2c_client;
#endif
/* Joystick emulation */