diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-12-22 11:49:04 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-02-27 17:03:16 -0800 |
commit | 11e3377b9a439a5cf989bdb2b16d90e237542ec2 (patch) | |
tree | 9eddc8d325dc638f7058a627f5ffe67d640b8faa /drivers/hwmon/lm83.c | |
parent | 7c68c2c761d157203b64ebbb61dd7b5b6c32df61 (diff) | |
download | lwn-11e3377b9a439a5cf989bdb2b16d90e237542ec2.tar.gz lwn-11e3377b9a439a5cf989bdb2b16d90e237542ec2.zip |
hwmon: (lm83) Move lm83_id to avoid forward declaration
There is no need to keep lm83_id at the end of the driver. Move it
forward to where it is needed to avoid a forward declaration.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm83.c')
-rw-r--r-- | drivers/hwmon/lm83.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 44d720af2473..2bb4bceef551 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c @@ -317,7 +317,12 @@ static int lm83_detect(struct i2c_client *new_client, return 0; } -static const struct i2c_device_id lm83_id[]; +static const struct i2c_device_id lm83_id[] = { + { "lm83", lm83 }, + { "lm82", lm82 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, lm83_id); static int lm83_probe(struct i2c_client *new_client) { @@ -352,13 +357,6 @@ static int lm83_probe(struct i2c_client *new_client) * Driver data (common to all clients) */ -static const struct i2c_device_id lm83_id[] = { - { "lm83", lm83 }, - { "lm82", lm82 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, lm83_id); - static struct i2c_driver lm83_driver = { .class = I2C_CLASS_HWMON, .driver = { |