mfd: palmas: Move OF table closer to its consumer
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 31 Aug 2023 18:31:52 +0000 (19:31 +0100)
committerLee Jones <lee@kernel.org>
Wed, 1 Nov 2023 10:02:10 +0000 (10:02 +0000)
Move OF table near to the user.

While at it, arrange compatible and data in single line.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230831183153.63750-4-biju.das.jz@bp.renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/palmas.c

index 3c0a3d6448349d14a227011118342bf59c422643..3ac9dec2b117a1fa4f44900da40050275ef1d6c8 100644 (file)
@@ -481,23 +481,6 @@ static const struct palmas_driver_data tps65917_data = {
        .irq_chip = &tps65917_irq_chip,
 };
 
-static const struct of_device_id of_palmas_match_tbl[] = {
-       {
-               .compatible = "ti,palmas",
-               .data = &palmas_data,
-       },
-       {
-               .compatible = "ti,tps659038",
-               .data = &tps659038_data,
-       },
-       {
-               .compatible = "ti,tps65917",
-               .data = &tps65917_data,
-       },
-       { }
-};
-MODULE_DEVICE_TABLE(of, of_palmas_match_tbl);
-
 static int palmas_i2c_probe(struct i2c_client *i2c)
 {
        struct palmas *palmas;
@@ -707,6 +690,14 @@ static void palmas_i2c_remove(struct i2c_client *i2c)
        }
 }
 
+static const struct of_device_id of_palmas_match_tbl[] = {
+       { .compatible = "ti,palmas", .data = &palmas_data },
+       { .compatible = "ti,tps659038", .data = &tps659038_data },
+       { .compatible = "ti,tps65917", .data = &tps65917_data },
+       { }
+};
+MODULE_DEVICE_TABLE(of, of_palmas_match_tbl);
+
 static const struct i2c_device_id palmas_i2c_id[] = {
        { "palmas", },
        { "twl6035", },