]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
backlight: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 19 Jun 2024 19:35:57 +0000 (21:35 +0200)
committerLee Jones <lee@kernel.org>
Thu, 20 Jun 2024 17:36:25 +0000 (18:36 +0100)
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240619193558.2543645-2-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/adp8870_bl.c
drivers/video/backlight/bd6107.c
drivers/video/backlight/ktz8866.c
drivers/video/backlight/lm3509_bl.c
drivers/video/backlight/lm3630a_bl.c
drivers/video/backlight/lm3639_bl.c
drivers/video/backlight/lv5207lp.c
drivers/video/backlight/mp3309c.c

index 6bb18dc970e974fa2e1cb8ff6f307b7ce42478d6..ad4bd4c8f441db18752dd96719028114e0656691 100644 (file)
@@ -963,7 +963,7 @@ static SIMPLE_DEV_PM_OPS(adp8870_i2c_pm_ops, adp8870_i2c_suspend,
                        adp8870_i2c_resume);
 
 static const struct i2c_device_id adp8870_id[] = {
-       { "adp8870", 0 },
+       { "adp8870" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, adp8870_id);
index 6be2c67ba85c77eefb6c1fb3d077e447e4ee4eef..90764f83d2f12005c14bc7ccc2e4d453c1ec52f5 100644 (file)
@@ -180,7 +180,7 @@ static void bd6107_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id bd6107_ids[] = {
-       { "bd6107", 0 },
+       { "bd6107" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, bd6107_ids);
index 014877b5a9848f27c71e5003299669d39fd6da8e..2e508741c0af649073326b2131d191d1b6974c4a 100644 (file)
@@ -179,8 +179,8 @@ static void ktz8866_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ktz8866_ids[] = {
-       { "ktz8866", 0 },
-       {},
+       { "ktz8866" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ktz8866_ids);
 
index c93cdedff5ad8503710097c03ea20ccb5bd9875b..11b8e1824e071b1c229151d5c225a6029d451e2b 100644 (file)
@@ -311,7 +311,10 @@ static void lm3509_remove(struct i2c_client *client)
        regmap_write(data->regmap, REG_GP, 0x00);
 }
 
-static const struct i2c_device_id lm3509_id[] = { { LM3509_NAME, 0 }, {} };
+static const struct i2c_device_id lm3509_id[] = {
+       { LM3509_NAME },
+       {}
+};
 
 MODULE_DEVICE_TABLE(i2c, lm3509_id);
 
index 76d47e2e82427017d0cc25997245f77d720c9f71..37651c2b939330fe29b7b82b7499e220c67a79c7 100644 (file)
@@ -596,7 +596,7 @@ static void lm3630a_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3630a_id[] = {
-       {LM3630A_NAME, 0},
+       { LM3630A_NAME },
        {}
 };
 
index 564f62acd7211ea8386a4c383a7ed6c6b6065ccc..37ccc631c49818c294912ff698e15d55d9a1ecda 100644 (file)
@@ -403,7 +403,7 @@ static void lm3639_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3639_id[] = {
-       {LM3639_NAME, 0},
+       { LM3639_NAME },
        {}
 };
 
index 0cf00fee0f6052f988d7dec1bbe91aec650b462b..5f60989fa70f2f254a1aa1e894a4eb9d3c7ce812 100644 (file)
@@ -132,7 +132,7 @@ static void lv5207lp_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lv5207lp_ids[] = {
-       { "lv5207lp", 0 },
+       { "lv5207lp" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lv5207lp_ids);
index a28036c964aff383fb59488ce3052dc515945be1..2bdb20129c818044787ff30b2fa4c76db25b5b33 100644 (file)
@@ -400,7 +400,7 @@ static const struct of_device_id mp3309c_match_table[] = {
 MODULE_DEVICE_TABLE(of, mp3309c_match_table);
 
 static const struct i2c_device_id mp3309c_id[] = {
-       { "mp3309c", 0 },
+       { "mp3309c" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mp3309c_id);