Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Guenter Roeck
a2cc2428 d82d5776

+18 -24
+18 -24
drivers/hwmon/adt7462.c
··· 232 232 u8 alarms[ADT7462_ALARM_REG_COUNT]; 233 233 }; 234 234 235 - static int adt7462_probe(struct i2c_client *client, 236 - const struct i2c_device_id *id); 237 - static int adt7462_detect(struct i2c_client *client, 238 - struct i2c_board_info *info); 239 - static int adt7462_remove(struct i2c_client *client); 240 - 241 - static const struct i2c_device_id adt7462_id[] = { 242 - { "adt7462", 0 }, 243 - { } 244 - }; 245 - MODULE_DEVICE_TABLE(i2c, adt7462_id); 246 - 247 - static 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 236 * 16-bit registers on the ADT7462 are low-byte first. The data sheet says 261 237 * that the low byte must be read before the high byte. ··· 1942 1966 sysfs_remove_group(&client->dev.kobj, &data->attrs); 1943 1967 return 0; 1944 1968 } 1969 + 1970 + static const struct i2c_device_id adt7462_id[] = { 1971 + { "adt7462", 0 }, 1972 + { } 1973 + }; 1974 + MODULE_DEVICE_TABLE(i2c, adt7462_id); 1975 + 1976 + static struct i2c_driver adt7462_driver = { 1977 + .class = I2C_CLASS_HWMON, 1978 + .driver = { 1979 + .name = "adt7462", 1980 + }, 1981 + .probe = adt7462_probe, 1982 + .remove = adt7462_remove, 1983 + .id_table = adt7462_id, 1984 + .detect = adt7462_detect, 1985 + .address_list = normal_i2c, 1986 + }; 1945 1987 1946 1988 module_i2c_driver(adt7462_driver); 1947 1989