]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: (pmbus/mp2869) Remove unused driver data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 12 May 2026 16:28:56 +0000 (18:28 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jun 2026 15:22:59 +0000 (08:22 -0700)
The driver doesn't make use of the i2c .driver_data and the of .data. So
drop the useless and irritating assignments.

While touching all these lines, use named initializers for the i2c
device ids and convert to the most common usage of spacing in such
arrays.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/dcfcc82a93da77b55503998c5c7acf2a80c4a615.1778603083.git.ukleinek@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/mp2869.c

index 4647892e511214f8d7f1b624c4bd879f19b0bab5..d345be920429d9d69adac922913cee39e6be8c4f 100644 (file)
@@ -632,20 +632,20 @@ static int mp2869_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id mp2869_id[] = {
-       {"mp2869", 0},
-       {"mp29608", 1},
-       {"mp29612", 2},
-       {"mp29816", 3},
-       {}
+       { .name = "mp2869" },
+       { .name = "mp29608" },
+       { .name = "mp29612" },
+       { .name = "mp29816" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, mp2869_id);
 
 static const struct of_device_id __maybe_unused mp2869_of_match[] = {
-       {.compatible = "mps,mp2869", .data = (void *)0},
-       {.compatible = "mps,mp29608", .data = (void *)1},
-       {.compatible = "mps,mp29612", .data = (void *)2},
-       {.compatible = "mps,mp29816", .data = (void *)3},
-       {}
+       { .compatible = "mps,mp2869" },
+       { .compatible = "mps,mp29608" },
+       { .compatible = "mps,mp29612" },
+       { .compatible = "mps,mp29816" },
+       { }
 };
 MODULE_DEVICE_TABLE(of, mp2869_of_match);