summaryrefslogtreecommitdiff
path: root/drivers/hwmon/adt7462.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-07-16 19:09:41 +0400
committerGuenter Roeck <linux@roeck-us.net>2014-08-04 18:01:39 +0400
commita2cc242823399bcb64dcd487f8b51c061844165c (patch)
tree27c1cc185a32c4afad8dbc8f3e0fa2122f203338 /drivers/hwmon/adt7462.c
parentd82d57767c85984132cde4efaf89ad6db290cda3 (diff)
downloadlinux-a2cc242823399bcb64dcd487f8b51c061844165c.tar.xz
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/adt7462.c')
-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 {
u8 alarms[ADT7462_ALARM_REG_COUNT];
};
-static int adt7462_probe(struct i2c_client *client,
- const struct i2c_device_id *id);
-static int adt7462_detect(struct i2c_client *client,
- struct i2c_board_info *info);
-static int adt7462_remove(struct i2c_client *client);
-
-static const struct i2c_device_id adt7462_id[] = {
- { "adt7462", 0 },
- { }
-};
-MODULE_DEVICE_TABLE(i2c, adt7462_id);
-
-static struct i2c_driver adt7462_driver = {
- .class = I2C_CLASS_HWMON,
- .driver = {
- .name = "adt7462",
- },
- .probe = adt7462_probe,
- .remove = adt7462_remove,
- .id_table = adt7462_id,
- .detect = adt7462_detect,
- .address_list = normal_i2c,
-};
-
/*
* 16-bit registers on the ADT7462 are low-byte first. The data sheet says
* that the low byte must be read before the high byte.
@@ -1967,6 +1943,24 @@ static int adt7462_remove(struct i2c_client *client)
return 0;
}
+static const struct i2c_device_id adt7462_id[] = {
+ { "adt7462", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, adt7462_id);
+
+static struct i2c_driver adt7462_driver = {
+ .class = I2C_CLASS_HWMON,
+ .driver = {
+ .name = "adt7462",
+ },
+ .probe = adt7462_probe,
+ .remove = adt7462_remove,
+ .id_table = adt7462_id,
+ .detect = adt7462_detect,
+ .address_list = normal_i2c,
+};
+
module_i2c_driver(adt7462_driver);
MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>");