]> git.ipfire.org Git - people/ms/linux.git/commitdiff
hwmon: (lm83) Move lm83_id to avoid forward declaration
authorGuenter Roeck <linux@roeck-us.net>
Wed, 22 Dec 2021 19:49:04 +0000 (11:49 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 28 Feb 2022 01:03:16 +0000 (17:03 -0800)
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>
drivers/hwmon/lm83.c

index 44d720af2473148b1e0a64f034e0c5ce4f2c47f8..2bb4bceef551ae800e8c737c648f7bc9675a14c6 100644 (file)
@@ -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 = {