Make the definition of ds1307_of_match more compact. This makes the code better readable and more in line with the definition of ds1307_id and ds1307_acpi_ids. Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> --- v2: - no changes v3: - add reviewed-by --- drivers/rtc/rtc-ds1307.c | 70 ++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 56 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index a2649385..b960ec3f 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -198,62 +198,20 @@ MODULE_DEVICE_TABLE(i2c, ds1307_id); #ifdef CONFIG_OF static const struct of_device_id ds1307_of_match[] = { - { - .compatible = "dallas,ds1307", - .data = (void *)ds_1307 - }, - { - .compatible = "dallas,ds1337", - .data = (void *)ds_1337 - }, - { - .compatible = "dallas,ds1338", - .data = (void *)ds_1338 - }, - { - .compatible = "dallas,ds1339", - .data = (void *)ds_1339 - }, - { - .compatible = "dallas,ds1388", - .data = (void *)ds_1388 - }, - { - .compatible = "dallas,ds1340", - .data = (void *)ds_1340 - }, - { - .compatible = "maxim,ds3231", - .data = (void *)ds_3231 - }, - { - .compatible = "st,m41t0", - .data = (void *)m41t00 - }, - { - .compatible = "st,m41t00", - .data = (void *)m41t00 - }, - { - .compatible = "microchip,mcp7940x", - .data = (void *)mcp794xx - }, - { - .compatible = "microchip,mcp7941x", - .data = (void *)mcp794xx - }, - { - .compatible = "pericom,pt7c4338", - .data = (void *)ds_1307 - }, - { - .compatible = "epson,rx8025", - .data = (void *)rx_8025 - }, - { - .compatible = "isil,isl12057", - .data = (void *)ds_1337 - }, + { .compatible = "dallas,ds1307", .data = (void *)ds_1307 }, + { .compatible = "dallas,ds1337", .data = (void *)ds_1337 }, + { .compatible = "dallas,ds1338", .data = (void *)ds_1338 }, + { .compatible = "dallas,ds1339", .data = (void *)ds_1339 }, + { .compatible = "dallas,ds1388", .data = (void *)ds_1388 }, + { .compatible = "dallas,ds1340", .data = (void *)ds_1340 }, + { .compatible = "maxim,ds3231", .data = (void *)ds_3231 }, + { .compatible = "st,m41t0", .data = (void *)m41t00 }, + { .compatible = "st,m41t00", .data = (void *)m41t00 }, + { .compatible = "microchip,mcp7940x", .data = (void *)mcp794xx }, + { .compatible = "microchip,mcp7941x", .data = (void *)mcp794xx }, + { .compatible = "pericom,pt7c4338", .data = (void *)ds_1307 }, + { .compatible = "epson,rx8025", .data = (void *)rx_8025 }, + { .compatible = "isil,isl12057", .data = (void *)ds_1337 }, { } }; MODULE_DEVICE_TABLE(of, ds1307_of_match); -- 2.13.0