Skip to content

Commit a47d377

Browse files
Uwe Kleine-Königalexandrebelloni
authored andcommitted
rtc: 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 a comma after the sentinel entry in rtc-hym8563. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 463927a commit a47d377

23 files changed

+27
-27
lines changed

drivers/rtc/rtc-ab-b5ze-s3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ MODULE_DEVICE_TABLE(of, abb5zes3_dt_match);
933933
#endif
934934

935935
static const struct i2c_device_id abb5zes3_id[] = {
936-
{ "abb5zes3", 0 },
936+
{ "abb5zes3" },
937937
{ }
938938
};
939939
MODULE_DEVICE_TABLE(i2c, abb5zes3_id);

drivers/rtc/rtc-ab-eoz9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ MODULE_DEVICE_TABLE(of, abeoz9_dt_match);
575575
#endif
576576

577577
static const struct i2c_device_id abeoz9_id[] = {
578-
{ "abeoz9", 0 },
578+
{ "abeoz9" },
579579
{ }
580580
};
581581

drivers/rtc/rtc-bq32k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static void bq32k_remove(struct i2c_client *client)
304304
}
305305

306306
static const struct i2c_device_id bq32k_id[] = {
307-
{ "bq32000", 0 },
307+
{ "bq32000" },
308308
{ }
309309
};
310310
MODULE_DEVICE_TABLE(i2c, bq32k_id);

drivers/rtc/rtc-ds1374.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#define DS1374_REG_TCR 0x09 /* Trickle Charge */
5353

5454
static const struct i2c_device_id ds1374_id[] = {
55-
{ "ds1374", 0 },
55+
{ "ds1374" },
5656
{ }
5757
};
5858
MODULE_DEVICE_TABLE(i2c, ds1374_id);

drivers/rtc/rtc-ds1672.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static int ds1672_probe(struct i2c_client *client)
133133
}
134134

135135
static const struct i2c_device_id ds1672_id[] = {
136-
{ "ds1672", 0 },
136+
{ "ds1672" },
137137
{ }
138138
};
139139
MODULE_DEVICE_TABLE(i2c, ds1672_id);

drivers/rtc/rtc-ds3232.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ static int ds3232_i2c_probe(struct i2c_client *client)
586586
}
587587

588588
static const struct i2c_device_id ds3232_id[] = {
589-
{ "ds3232", 0 },
589+
{ "ds3232" },
590590
{ }
591591
};
592592
MODULE_DEVICE_TABLE(i2c, ds3232_id);

drivers/rtc/rtc-em3027.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int em3027_probe(struct i2c_client *client)
129129
}
130130

131131
static const struct i2c_device_id em3027_id[] = {
132-
{ "em3027", 0 },
132+
{ "em3027" },
133133
{ }
134134
};
135135
MODULE_DEVICE_TABLE(i2c, em3027_id);

drivers/rtc/rtc-fm3130.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct fm3130 {
5353
int data_valid;
5454
};
5555
static const struct i2c_device_id fm3130_id[] = {
56-
{ "fm3130", 0 },
56+
{ "fm3130" },
5757
{ }
5858
};
5959
MODULE_DEVICE_TABLE(i2c, fm3130_id);

drivers/rtc/rtc-hym8563.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ static int hym8563_probe(struct i2c_client *client)
559559
}
560560

561561
static const struct i2c_device_id hym8563_id[] = {
562-
{ "hym8563", 0 },
563-
{},
562+
{ "hym8563" },
563+
{}
564564
};
565565
MODULE_DEVICE_TABLE(i2c, hym8563_id);
566566

drivers/rtc/rtc-isl12022.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static const struct of_device_id isl12022_dt_match[] = {
366366
MODULE_DEVICE_TABLE(of, isl12022_dt_match);
367367

368368
static const struct i2c_device_id isl12022_id[] = {
369-
{ "isl12022", 0 },
369+
{ "isl12022" },
370370
{ }
371371
};
372372
MODULE_DEVICE_TABLE(i2c, isl12022_id);

0 commit comments

Comments
 (0)