]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regulator: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 13 May 2024 08:05:26 +0000 (10:05 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 27 May 2024 00:32:50 +0000 (01:32 +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@pengutronix.de>
Link: https://msgid.link/r/20240513080525.2353168-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
18 files changed:
drivers/regulator/da9210-regulator.c
drivers/regulator/lp3971.c
drivers/regulator/lp3972.c
drivers/regulator/lp8755.c
drivers/regulator/max1586.c
drivers/regulator/max20411-regulator.c
drivers/regulator/max8649.c
drivers/regulator/max8893.c
drivers/regulator/max8952.c
drivers/regulator/mcp16502.c
drivers/regulator/mt6311-regulator.c
drivers/regulator/pf8x00-regulator.c
drivers/regulator/pv88060-regulator.c
drivers/regulator/pv88090-regulator.c
drivers/regulator/slg51000-regulator.c
drivers/regulator/sy8106a-regulator.c
drivers/regulator/tps6286x-regulator.c
drivers/regulator/tps6287x-regulator.c

index 02b85ca4a6fc70f8b67bcd6adf1885227bf2dcb5..39ade0dba40f010d151c50c0c50d5c0c9ec2b4b0 100644 (file)
@@ -202,8 +202,8 @@ static int da9210_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id da9210_i2c_id[] = {
-       {"da9210", 0},
-       {},
+       { "da9210" },
+       {}
 };
 
 MODULE_DEVICE_TABLE(i2c, da9210_i2c_id);
index e1b5c45f97f41b0b59ef08634a86e3b13b558961..d4dab86fe3854583171f1120dcd3b460a0191c58 100644 (file)
@@ -439,7 +439,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lp3971_i2c_id[] = {
-       { "lp3971", 0 },
+       { "lp3971" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id);
index 7bd6f05edd8d914f97d29ffa68f3674eb1560abe..1b918fb72134613499fe23540eccf5a116f70ad6 100644 (file)
@@ -537,7 +537,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id lp3972_i2c_id[] = {
-       { "lp3972", 0 },
+       { "lp3972" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp3972_i2c_id);
index 8d01e18046f342c5145833221840bbc1910d1ef9..5509bee49bda4083c67884c986c7ac8ea5de779d 100644 (file)
@@ -430,7 +430,7 @@ static void lp8755_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp8755_id[] = {
-       {LP8755_NAME, 0},
+       { LP8755_NAME },
        {}
 };
 
index 0f133129252e90bdf9ab19029c43539d7169c4a9..4242fbb7b147670dcc3795eed26d0610292bd4e9 100644 (file)
@@ -276,7 +276,7 @@ static int max1586_pmic_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max1586_id[] = {
-       { "max1586", 0 },
+       { "max1586" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max1586_id);
index 8c09dc71b16db5a92425b97e0e777de4da454f75..ce430c925c712d96b9071c973385b564fb1c54d5 100644 (file)
@@ -145,8 +145,8 @@ static const struct of_device_id of_max20411_match_tbl[] = {
 MODULE_DEVICE_TABLE(of, of_max20411_match_tbl);
 
 static const struct i2c_device_id max20411_id[] = {
-       { "max20411", 0 },
-       { },
+       { "max20411" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, max20411_id);
 
index 24e1dfba78c8b56c27f3050a3a3d5506ceeaf30e..f57c588bcf28ba9d6c18281f7154402e425dac9c 100644 (file)
@@ -240,7 +240,7 @@ static int max8649_regulator_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max8649_id[] = {
-       { "max8649", 0 },
+       { "max8649" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max8649_id);
index 30592425e193e65259daba55d79149bf42f3d0c6..5a90633d8536babbefc78bb4eeb05686534b5993 100644 (file)
@@ -162,8 +162,8 @@ MODULE_DEVICE_TABLE(of, max8893_dt_match);
 #endif
 
 static const struct i2c_device_id max8893_ids[] = {
-       { "max8893", 0 },
-       { },
+       { "max8893" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, max8893_ids);
 
index 0b0b841d214afae28b79bd71e795684d5f486a9b..1f94315bfb02ba57c09b246bb8709d1912921b1e 100644 (file)
@@ -307,8 +307,8 @@ static int max8952_pmic_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max8952_ids[] = {
-       { "max8952", 0 },
-       { },
+       { "max8952" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, max8952_ids);
 
index 0c15a19fe83a0f644bb3c41550a87e7db3b977b7..5de9d4fa5113f5f039c46979c54854c36834ba54 100644 (file)
@@ -577,7 +577,7 @@ static const struct dev_pm_ops mcp16502_pm_ops = {
 };
 #endif
 static const struct i2c_device_id mcp16502_i2c_id[] = {
-       { "mcp16502", 0 },
+       { "mcp16502" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mcp16502_i2c_id);
index c00638cd2d1e13ead3132a626058f9219d81235f..2ebc1c0b5e6f60d52dd27a936fd3f895bd819e13 100644 (file)
@@ -133,8 +133,8 @@ static int mt6311_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id mt6311_i2c_id[] = {
-       {"mt6311", 0},
-       {},
+       { "mt6311" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, mt6311_i2c_id);
 
index 9fd8e0949b327f59bd0628521a6461bd477ad17b..ea3611de42b4a41fe8d4b10a98af21e7f4727540 100644 (file)
@@ -596,10 +596,10 @@ static const struct of_device_id pf8x00_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, pf8x00_dt_ids);
 
 static const struct i2c_device_id pf8x00_i2c_id[] = {
-       { "pf8100", 0 },
-       { "pf8121a", 0 },
-       { "pf8200", 0 },
-       {},
+       { "pf8100" },
+       { "pf8121a" },
+       { "pf8200" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, pf8x00_i2c_id);
 
index aa90360fa046af1abce2b9d66327cfe2f01e3f89..ae1c4b9daaa1e1c72226bc8913e57c35249aa0b6 100644 (file)
@@ -360,8 +360,8 @@ static int pv88060_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id pv88060_i2c_id[] = {
-       {"pv88060", 0},
-       {},
+       { "pv88060" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, pv88060_i2c_id);
 
index f4acde4d56c81c2b4444480f6fe01437f252cca3..3c48757bbbdad03cb04897213de44cc3351829a7 100644 (file)
@@ -381,8 +381,8 @@ static int pv88090_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id pv88090_i2c_id[] = {
-       {"pv88090", 0},
-       {},
+       { "pv88090" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, pv88090_i2c_id);
 
index 59aa16825d8a607fed750e19baa7f5eeb37c7072..3bbd4a29e6d32664bbf11f8b73345875f5730673 100644 (file)
@@ -497,8 +497,8 @@ static int slg51000_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id slg51000_i2c_id[] = {
-       {"slg51000", 0},
-       {},
+       { "slg51000" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, slg51000_i2c_id);
 
index 1bcfdd6dcfc164d071077bddf03668dabf63b991..d79a4cc25a0da7b75ffa1ad862b2e82d7c2e34b5 100644 (file)
@@ -130,8 +130,8 @@ static const struct of_device_id sy8106a_i2c_of_match[] = {
 MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
 
 static const struct i2c_device_id sy8106a_i2c_id[] = {
-       { "sy8106a", 0 },
-       { },
+       { "sy8106a" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);
 
index 758c7026965384cd622f70634d6c61c87e9e61bc..67e4c8d316d91f82fdb47df4a2341af5d2ac3b76 100644 (file)
@@ -136,11 +136,11 @@ static int tps6286x_i2c_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tps6286x_i2c_id[] = {
-       { "tps62864", 0 },
-       { "tps62866", 0 },
-       { "tps62868", 0 },
-       { "tps62869", 0 },
-       {},
+       { "tps62864" },
+       { "tps62866" },
+       { "tps62868" },
+       { "tps62869" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, tps6286x_i2c_id);
 
index 3c9d79e003e4b9b2c1b73d405a6488dd2ce5ac3a..7a0551f0c8c0aa414abc03313a40e0d17871a280 100644 (file)
@@ -165,11 +165,11 @@ static const struct of_device_id tps6287x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, tps6287x_dt_ids);
 
 static const struct i2c_device_id tps6287x_i2c_id[] = {
-       { "tps62870", 0 },
-       { "tps62871", 0 },
-       { "tps62872", 0 },
-       { "tps62873", 0 },
-       {},
+       { "tps62870" },
+       { "tps62871" },
+       { "tps62872" },
+       { "tps62873" },
+       {}
 };
 
 MODULE_DEVICE_TABLE(i2c, tps6287x_i2c_id);