Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: 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 <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240522165358.62238-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Uwe Kleine-König and committed by
Lee Jones
c0e3d2be b1bbd20f

+17 -17
+2 -2
drivers/leds/flash/leds-as3645a.c
··· 743 743 } 744 744 745 745 static const struct i2c_device_id as3645a_id_table[] = { 746 - { AS_NAME, 0 }, 747 - { }, 746 + { AS_NAME }, 747 + { } 748 748 }; 749 749 MODULE_DEVICE_TABLE(i2c, as3645a_id_table); 750 750
+2 -2
drivers/leds/leds-an30259a.c
··· 331 331 MODULE_DEVICE_TABLE(of, an30259a_match_table); 332 332 333 333 static const struct i2c_device_id an30259a_id[] = { 334 - { "an30259a", 0 }, 335 - { /* sentinel */ }, 334 + { "an30259a" }, 335 + { /* sentinel */ } 336 336 }; 337 337 MODULE_DEVICE_TABLE(i2c, an30259a_id); 338 338
+1 -1
drivers/leds/leds-bd2802.c
··· 776 776 static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume); 777 777 778 778 static const struct i2c_device_id bd2802_id[] = { 779 - { "BD2802", 0 }, 779 + { "BD2802" }, 780 780 { } 781 781 }; 782 782 MODULE_DEVICE_TABLE(i2c, bd2802_id);
+1 -1
drivers/leds/leds-blinkm.c
··· 718 718 } 719 719 720 720 static const struct i2c_device_id blinkm_id[] = { 721 - {"blinkm", 0}, 721 + { "blinkm" }, 722 722 {} 723 723 }; 724 724
+1 -1
drivers/leds/leds-lm3530.c
··· 478 478 } 479 479 480 480 static const struct i2c_device_id lm3530_id[] = { 481 - {LM3530_NAME, 0}, 481 + { LM3530_NAME }, 482 482 {} 483 483 }; 484 484 MODULE_DEVICE_TABLE(i2c, lm3530_id);
+1 -1
drivers/leds/leds-lm3532.c
··· 726 726 MODULE_DEVICE_TABLE(of, of_lm3532_leds_match); 727 727 728 728 static const struct i2c_device_id lm3532_id[] = { 729 - {LM3532_NAME, 0}, 729 + { LM3532_NAME }, 730 730 {} 731 731 }; 732 732 MODULE_DEVICE_TABLE(i2c, lm3532_id);
+1 -1
drivers/leds/leds-lm3642.c
··· 390 390 } 391 391 392 392 static const struct i2c_device_id lm3642_id[] = { 393 - {LM3642_NAME, 0}, 393 + { LM3642_NAME }, 394 394 {} 395 395 }; 396 396
+1 -1
drivers/leds/leds-lm3697.c
··· 360 360 } 361 361 362 362 static const struct i2c_device_id lm3697_id[] = { 363 - { "lm3697", 0 }, 363 + { "lm3697" }, 364 364 { } 365 365 }; 366 366 MODULE_DEVICE_TABLE(i2c, lm3697_id);
+1 -1
drivers/leds/leds-lp3944.c
··· 417 417 418 418 /* lp3944 i2c driver struct */ 419 419 static const struct i2c_device_id lp3944_id[] = { 420 - {"lp3944", 0}, 420 + { "lp3944" }, 421 421 {} 422 422 }; 423 423
+1 -1
drivers/leds/leds-lp3952.c
··· 266 266 } 267 267 268 268 static const struct i2c_device_id lp3952_id[] = { 269 - {LP3952_NAME, 0}, 269 + { LP3952_NAME }, 270 270 {} 271 271 }; 272 272 MODULE_DEVICE_TABLE(i2c, lp3952_id);
+1 -1
drivers/leds/leds-lp5521.c
··· 591 591 } 592 592 593 593 static const struct i2c_device_id lp5521_id[] = { 594 - { "lp5521", 0 }, /* Three channel chip */ 594 + { "lp5521" }, /* Three channel chip */ 595 595 { } 596 596 }; 597 597 MODULE_DEVICE_TABLE(i2c, lp5521_id);
+1 -1
drivers/leds/leds-lp5562.c
··· 584 584 } 585 585 586 586 static const struct i2c_device_id lp5562_id[] = { 587 - { "lp5562", 0 }, 587 + { "lp5562" }, 588 588 { } 589 589 }; 590 590 MODULE_DEVICE_TABLE(i2c, lp5562_id);
+1 -1
drivers/leds/leds-lp8501.c
··· 375 375 } 376 376 377 377 static const struct i2c_device_id lp8501_id[] = { 378 - { "lp8501", 0 }, 378 + { "lp8501" }, 379 379 { } 380 380 }; 381 381 MODULE_DEVICE_TABLE(i2c, lp8501_id);
+1 -1
drivers/leds/leds-lp8860.c
··· 459 459 } 460 460 461 461 static const struct i2c_device_id lp8860_id[] = { 462 - { "lp8860", 0 }, 462 + { "lp8860" }, 463 463 { } 464 464 }; 465 465 MODULE_DEVICE_TABLE(i2c, lp8860_id);
+1 -1
drivers/leds/leds-turris-omnia.c
··· 534 534 }; 535 535 536 536 static const struct i2c_device_id omnia_id[] = { 537 - { "omnia", 0 }, 537 + { "omnia" }, 538 538 { } 539 539 }; 540 540 MODULE_DEVICE_TABLE(i2c, omnia_id);