aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-07-16 11:09:41 -0400
committerGuenter Roeck <linux@roeck-us.net>2014-08-04 10:01:39 -0400
commita2cc242823399bcb64dcd487f8b51c061844165c (patch)
tree27c1cc185a32c4afad8dbc8f3e0fa2122f203338 /drivers/hwmon
parentd82d57767c85984132cde4efaf89ad6db290cda3 (diff)
hwmon: (adt7462) Avoid forward declaration
Reorder functions to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/adt7462.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
index 562cc3881d33..c4a1784e3f2b 100644
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -232,30 +232,6 @@ struct adt7462_data {
232 u8 alarms[ADT7462_ALARM_REG_COUNT]; 232 u8 alarms[ADT7462_ALARM_REG_COUNT];
233}; 233};
234 234
235static int adt7462_probe(struct i2c_client *client,
236 const struct i2c_device_id *id);
237static int adt7462_detect(struct i2c_client *client,
238 struct i2c_board_info *info);
239static int adt7462_remove(struct i2c_client *client);
240
241static const struct i2c_device_id adt7462_id[] = {
242 { "adt7462", 0 },
243 { }
244};
245MODULE_DEVICE_TABLE(i2c, adt7462_id);
246
247static struct i2c_driver adt7462_driver = {
248 .class = I2C_CLASS_HWMON,
249 .driver = {
250 .name = "adt7462",
251 },
252 .probe = adt7462_probe,
253 .remove = adt7462_remove,
254 .id_table = adt7462_id,
255 .detect = adt7462_detect,
256 .address_list = normal_i2c,
257};
258
259/* 235/*
260 * 16-bit registers on the ADT7462 are low-byte first. The data sheet says 236 * 16-bit registers on the ADT7462 are low-byte first. The data sheet says
261 * that the low byte must be read before the high byte. 237 * that the low byte must be read before the high byte.
@@ -1967,6 +1943,24 @@ static int adt7462_remove(struct i2c_client *client)
1967 return 0; 1943 return 0;
1968} 1944}
1969 1945
1946static const struct i2c_device_id adt7462_id[] = {
1947 { "adt7462", 0 },
1948 { }
1949};
1950MODULE_DEVICE_TABLE(i2c, adt7462_id);
1951
1952static struct i2c_driver adt7462_driver = {
1953 .class = I2C_CLASS_HWMON,
1954 .driver = {
1955 .name = "adt7462",
1956 },
1957 .probe = adt7462_probe,
1958 .remove = adt7462_remove,
1959 .id_table = adt7462_id,
1960 .detect = adt7462_detect,
1961 .address_list = normal_i2c,
1962};
1963
1970module_i2c_driver(adt7462_driver); 1964module_i2c_driver(adt7462_driver);
1971 1965
1972MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>"); 1966MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>");