Skip to content

Commit 5852f2a

Browse files
Uwe Kleine-Königdtor
authored andcommitted
Input: 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: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent adb2e48 commit 5852f2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+99
-99
lines changed

drivers/input/joystick/as5011.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static void as5011_remove(struct i2c_client *client)
337337
}
338338

339339
static const struct i2c_device_id as5011_id[] = {
340-
{ MODULE_DEVICE_ALIAS, 0 },
340+
{ MODULE_DEVICE_ALIAS },
341341
{ }
342342
};
343343
MODULE_DEVICE_TABLE(i2c, as5011_id);

drivers/input/joystick/qwiic-joystick.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ MODULE_DEVICE_TABLE(of, of_qwiic_match);
126126
#endif /* CONFIG_OF */
127127

128128
static const struct i2c_device_id qwiic_id_table[] = {
129-
{ KBUILD_MODNAME, 0 },
130-
{ },
129+
{ KBUILD_MODNAME },
130+
{ }
131131
};
132132
MODULE_DEVICE_TABLE(i2c, qwiic_id_table);
133133

drivers/input/keyboard/adp5588-keys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,8 @@ static int adp5588_resume(struct device *dev)
832832
static DEFINE_SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
833833

834834
static const struct i2c_device_id adp5588_id[] = {
835-
{ "adp5588-keys", 0 },
836-
{ "adp5587-keys", 0 },
835+
{ "adp5588-keys" },
836+
{ "adp5587-keys" },
837837
{ }
838838
};
839839
MODULE_DEVICE_TABLE(i2c, adp5588_id);

drivers/input/keyboard/cypress-sf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(cypress_sf_pm_ops,
209209
cypress_sf_suspend, cypress_sf_resume);
210210

211211
static struct i2c_device_id cypress_sf_id_table[] = {
212-
{ CYPRESS_SF_DEV_NAME, 0 },
212+
{ CYPRESS_SF_DEV_NAME },
213213
{ }
214214
};
215215
MODULE_DEVICE_TABLE(i2c, cypress_sf_id_table);

drivers/input/keyboard/dlink-dir685-touchkeys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int dir685_tk_probe(struct i2c_client *client)
127127
}
128128

129129
static const struct i2c_device_id dir685_tk_id[] = {
130-
{ "dir685tk", 0 },
130+
{ "dir685tk" },
131131
{ }
132132
};
133133
MODULE_DEVICE_TABLE(i2c, dir685_tk_id);

drivers/input/keyboard/lm8323.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static int lm8323_resume(struct device *dev)
792792
static DEFINE_SIMPLE_DEV_PM_OPS(lm8323_pm_ops, lm8323_suspend, lm8323_resume);
793793

794794
static const struct i2c_device_id lm8323_id[] = {
795-
{ "lm8323", 0 },
795+
{ "lm8323" },
796796
{ }
797797
};
798798

drivers/input/keyboard/lm8333.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int lm8333_probe(struct i2c_client *client)
194194
}
195195

196196
static const struct i2c_device_id lm8333_id[] = {
197-
{ "lm8333", 0 },
197+
{ "lm8333" },
198198
{ }
199199
};
200200
MODULE_DEVICE_TABLE(i2c, lm8333_id);

drivers/input/keyboard/max7359_keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static int max7359_resume(struct device *dev)
270270
static DEFINE_SIMPLE_DEV_PM_OPS(max7359_pm, max7359_suspend, max7359_resume);
271271

272272
static const struct i2c_device_id max7359_ids[] = {
273-
{ "max7359", 0 },
273+
{ "max7359" },
274274
{ }
275275
};
276276
MODULE_DEVICE_TABLE(i2c, max7359_ids);

drivers/input/keyboard/mpr121_touchkey.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static int mpr_resume(struct device *dev)
369369
static DEFINE_SIMPLE_DEV_PM_OPS(mpr121_touchkey_pm_ops, mpr_suspend, mpr_resume);
370370

371371
static const struct i2c_device_id mpr121_id[] = {
372-
{ "mpr121_touchkey", 0 },
372+
{ "mpr121_touchkey" },
373373
{ }
374374
};
375375
MODULE_DEVICE_TABLE(i2c, mpr121_id);

drivers/input/keyboard/qt1070.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ static int qt1070_resume(struct device *dev)
234234
static DEFINE_SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume);
235235

236236
static const struct i2c_device_id qt1070_id[] = {
237-
{ "qt1070", 0 },
238-
{ },
237+
{ "qt1070" },
238+
{ }
239239
};
240240
MODULE_DEVICE_TABLE(i2c, qt1070_id);
241241

0 commit comments

Comments
 (0)