Commit 5e9ea43c authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Lee Jones

mfd: Drop explicit initialization of struct i2c_device_id::driver_data to 0

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 93411db5
......@@ -116,7 +116,7 @@ enum {
#define PM800_CHIP_GEN_ID_NUM 0x3
static const struct i2c_device_id pm80x_id_table[] = {
{"88PM800", 0},
{ "88PM800" },
{} /* NULL terminated */
};
MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
......
......@@ -30,7 +30,7 @@
#include <linux/delay.h>
static const struct i2c_device_id pm80x_id_table[] = {
{"88PM805", 0},
{ "88PM805" },
{} /* NULL terminated */
};
MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
......
......@@ -1233,7 +1233,7 @@ static int pm860x_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_pm_ops, pm860x_suspend, pm860x_resume);
static const struct i2c_device_id pm860x_id_table[] = {
{ "88PM860x", 0 },
{ "88PM860x" },
{}
};
MODULE_DEVICE_TABLE(i2c, pm860x_id_table);
......
......@@ -439,7 +439,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(aat2870_pm_ops, aat2870_i2c_suspend,
aat2870_i2c_resume);
static const struct i2c_device_id aat2870_i2c_id_table[] = {
{ "aat2870", 0 },
{ "aat2870" },
{ }
};
......
......@@ -54,7 +54,7 @@ static int act8945a_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id act8945a_i2c_id[] = {
{ "act8945a", 0 },
{ "act8945a" },
{}
};
MODULE_DEVICE_TABLE(i2c, act8945a_i2c_id);
......
......@@ -430,8 +430,8 @@ static const struct of_device_id as3722_of_match[] = {
MODULE_DEVICE_TABLE(of, as3722_of_match);
static const struct i2c_device_id as3722_i2c_id[] = {
{ "as3722", 0 },
{},
{ "as3722" },
{}
};
MODULE_DEVICE_TABLE(i2c, as3722_i2c_id);
......
......@@ -75,18 +75,18 @@ MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
#endif
static const struct i2c_device_id axp20x_i2c_id[] = {
{ "axp152", 0 },
{ "axp192", 0 },
{ "axp202", 0 },
{ "axp209", 0 },
{ "axp221", 0 },
{ "axp223", 0 },
{ "axp313a", 0 },
{ "axp717", 0 },
{ "axp803", 0 },
{ "axp806", 0 },
{ "axp15060", 0 },
{ },
{ "axp152" },
{ "axp192" },
{ "axp202" },
{ "axp209" },
{ "axp221" },
{ "axp223" },
{ "axp313a" },
{ "axp717" },
{ "axp803" },
{ "axp806" },
{ "axp15060" },
{ }
};
MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
......
......@@ -268,7 +268,7 @@ static const struct of_device_id bd9571mwv_of_match_table[] = {
MODULE_DEVICE_TABLE(of, bd9571mwv_of_match_table);
static const struct i2c_device_id bd9571mwv_id_table[] = {
{ "bd9571mwv", 0 },
{ "bd9571mwv" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, bd9571mwv_id_table);
......
......@@ -54,7 +54,7 @@ static void da9055_i2c_remove(struct i2c_client *i2c)
* and CODEC, which must be different to operate together.
*/
static const struct i2c_device_id da9055_i2c_id[] = {
{"da9055-pmic", 0},
{ "da9055-pmic" },
{ }
};
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
......
......@@ -614,8 +614,8 @@ static void lm3533_i2c_remove(struct i2c_client *i2c)
}
static const struct i2c_device_id lm3533_i2c_ids[] = {
{ "lm3533", 0 },
{ },
{ "lm3533" },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm3533_i2c_ids);
......
......@@ -126,7 +126,7 @@ static int lp3943_probe(struct i2c_client *cl)
}
static const struct i2c_device_id lp3943_ids[] = {
{ "lp3943", 0 },
{ "lp3943" },
{ }
};
MODULE_DEVICE_TABLE(i2c, lp3943_ids);
......
......@@ -68,8 +68,8 @@ static const struct of_device_id of_lp873x_match_table[] = {
MODULE_DEVICE_TABLE(of, of_lp873x_match_table);
static const struct i2c_device_id lp873x_id_table[] = {
{ "lp873x", 0 },
{ },
{ "lp873x" },
{ }
};
MODULE_DEVICE_TABLE(i2c, lp873x_id_table);
......
......@@ -106,8 +106,8 @@ static void lp87565_shutdown(struct i2c_client *client)
}
static const struct i2c_device_id lp87565_id_table[] = {
{ "lp87565-q1", 0 },
{ },
{ "lp87565-q1" },
{ }
};
MODULE_DEVICE_TABLE(i2c, lp87565_id_table);
......
......@@ -216,7 +216,7 @@ static void lp8788_remove(struct i2c_client *cl)
}
static const struct i2c_device_id lp8788_ids[] = {
{"lp8788", 0},
{ "lp8788" },
{ }
};
MODULE_DEVICE_TABLE(i2c, lp8788_ids);
......
......@@ -300,7 +300,7 @@ MODULE_DEVICE_TABLE(of, max8907_of_match);
#endif
static const struct i2c_device_id max8907_i2c_id[] = {
{"max8907", 0},
{ "max8907" },
{}
};
MODULE_DEVICE_TABLE(i2c, max8907_i2c_id);
......
......@@ -127,8 +127,8 @@ EXPORT_SYMBOL(max8925_set_bits);
static const struct i2c_device_id max8925_id_table[] = {
{ "max8925", 0 },
{ },
{ "max8925" },
{ }
};
static int max8925_dt_init(struct device_node *np, struct device *dev,
......
......@@ -1230,7 +1230,7 @@ static void menelaus_remove(struct i2c_client *client)
}
static const struct i2c_device_id menelaus_id[] = {
{ "menelaus", 0 },
{ "menelaus" },
{ }
};
MODULE_DEVICE_TABLE(i2c, menelaus_id);
......
......@@ -300,8 +300,8 @@ static void retu_remove(struct i2c_client *i2c)
}
static const struct i2c_device_id retu_id[] = {
{ "retu", 0 },
{ "tahvo", 0 },
{ "retu" },
{ "tahvo" },
{ }
};
MODULE_DEVICE_TABLE(i2c, retu_id);
......
......@@ -222,8 +222,8 @@ static int stw481x_probe(struct i2c_client *client)
* the structure of the I2C core.
*/
static const struct i2c_device_id stw481x_id[] = {
{ "stw481x", 0 },
{ },
{ "stw481x" },
{ }
};
MODULE_DEVICE_TABLE(i2c, stw481x_id);
......
......@@ -191,8 +191,8 @@ static void tps6105x_remove(struct i2c_client *client)
}
static const struct i2c_device_id tps6105x_id[] = {
{ "tps61050", 0 },
{ "tps61052", 0 },
{ "tps61050" },
{ "tps61052" },
{ }
};
MODULE_DEVICE_TABLE(i2c, tps6105x_id);
......
......@@ -103,7 +103,7 @@ static int tps6507x_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id tps6507x_i2c_id[] = {
{ "tps6507x", 0 },
{ "tps6507x" },
{ }
};
MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id);
......
......@@ -127,7 +127,7 @@ static void tps65086_remove(struct i2c_client *client)
}
static const struct i2c_device_id tps65086_id_table[] = {
{ "tps65086", 0 },
{ "tps65086" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, tps65086_id_table);
......
......@@ -225,8 +225,8 @@ static int tps65090_i2c_probe(struct i2c_client *client)
static const struct i2c_device_id tps65090_id_table[] = {
{ "tps65090", 0 },
{ },
{ "tps65090" },
{ }
};
static struct i2c_driver tps65090_driver = {
......
......@@ -642,8 +642,8 @@ static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend,
tps6586x_i2c_resume);
static const struct i2c_device_id tps6586x_id_table[] = {
{ "tps6586x", 0 },
{ },
{ "tps6586x" },
{ }
};
MODULE_DEVICE_TABLE(i2c, tps6586x_id_table);
......
......@@ -50,7 +50,7 @@ static void tps65912_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id tps65912_i2c_id_table[] = {
{ "tps65912", 0 },
{ "tps65912" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, tps65912_i2c_id_table);
......
......@@ -817,9 +817,9 @@ static void twl6040_remove(struct i2c_client *client)
}
static const struct i2c_device_id twl6040_i2c_id[] = {
{ "twl6040", 0, },
{ "twl6041", 0, },
{ },
{ "twl6040" },
{ "twl6041" },
{ }
};
MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id);
......
......@@ -13,7 +13,7 @@
#define DRIVER_DESC "WL1273 FM Radio Core"
static const struct i2c_device_id wl1273_driver_id_table[] = {
{ WL1273_FM_DRIVER_NAME, 0 },
{ WL1273_FM_DRIVER_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, wl1273_driver_id_table);
......
......@@ -41,9 +41,9 @@ static int wm8350_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id wm8350_i2c_id[] = {
{ "wm8350", 0 },
{ "wm8351", 0 },
{ "wm8352", 0 },
{ "wm8350" },
{ "wm8351" },
{ "wm8352" },
{ }
};
......
......@@ -135,7 +135,7 @@ static int wm8400_i2c_probe(struct i2c_client *i2c)
}
static const struct i2c_device_id wm8400_i2c_id[] = {
{ "wm8400", 0 },
{ "wm8400" },
{ }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment