aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2023-09-23 18:19:21 +0100
committerLee Jones <lee@kernel.org>2023-11-01 11:28:55 +0000
commit8d3fd7edd5f70fb814c07a321f347b5fe21d3fac (patch)
tree0cab4c9b11e9a99821bb7ebbdf8eb2731c7a53a1 /drivers/leds
parent3b581cb58816d07b033c800d42a040d7ba566fb6 (diff)
downloadlinux-8d3fd7edd5f70fb814c07a321f347b5fe21d3fac.tar.gz
leds: pca955x: Cleanup OF/ID table terminators
Some cleanups: * Remove the trailing comma in the terminator entry for the OF table making code robust against (theoretical) misrebases or other similar things where the new entry goes _after_ the termination without the compiler noticing. * Drop a space from terminator entry for ID table. While at it, move OF/ID table near to the user. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230923171921.53503-3-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-pca955x.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 891cfc05301d3..94a9f8a54b359 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -104,16 +104,6 @@ static const struct pca955x_chipdef pca955x_chipdefs[] = {
},
};
-static const struct i2c_device_id pca955x_id[] = {
- { "pca9550", (kernel_ulong_t)&pca955x_chipdefs[pca9550] },
- { "pca9551", (kernel_ulong_t)&pca955x_chipdefs[pca9551] },
- { "pca9552", (kernel_ulong_t)&pca955x_chipdefs[pca9552] },
- { "ibm-pca9552", (kernel_ulong_t)&pca955x_chipdefs[ibm_pca9552] },
- { "pca9553", (kernel_ulong_t)&pca955x_chipdefs[pca9553] },
- { }
-};
-MODULE_DEVICE_TABLE(i2c, pca955x_id);
-
struct pca955x {
struct mutex lock;
struct pca955x_led *leds;
@@ -457,16 +447,6 @@ pca955x_get_pdata(struct i2c_client *client, const struct pca955x_chipdef *chip)
return pdata;
}
-static const struct of_device_id of_pca955x_match[] = {
- { .compatible = "nxp,pca9550", .data = &pca955x_chipdefs[pca9550] },
- { .compatible = "nxp,pca9551", .data = &pca955x_chipdefs[pca9551] },
- { .compatible = "nxp,pca9552", .data = &pca955x_chipdefs[pca9552] },
- { .compatible = "ibm,pca9552", .data = &pca955x_chipdefs[ibm_pca9552] },
- { .compatible = "nxp,pca9553", .data = &pca955x_chipdefs[pca9553] },
- {},
-};
-MODULE_DEVICE_TABLE(of, of_pca955x_match);
-
static int pca955x_probe(struct i2c_client *client)
{
struct pca955x *pca955x;
@@ -650,6 +630,26 @@ static int pca955x_probe(struct i2c_client *client)
return 0;
}
+static const struct i2c_device_id pca955x_id[] = {
+ { "pca9550", (kernel_ulong_t)&pca955x_chipdefs[pca9550] },
+ { "pca9551", (kernel_ulong_t)&pca955x_chipdefs[pca9551] },
+ { "pca9552", (kernel_ulong_t)&pca955x_chipdefs[pca9552] },
+ { "ibm-pca9552", (kernel_ulong_t)&pca955x_chipdefs[ibm_pca9552] },
+ { "pca9553", (kernel_ulong_t)&pca955x_chipdefs[pca9553] },
+ {}
+};
+MODULE_DEVICE_TABLE(i2c, pca955x_id);
+
+static const struct of_device_id of_pca955x_match[] = {
+ { .compatible = "nxp,pca9550", .data = &pca955x_chipdefs[pca9550] },
+ { .compatible = "nxp,pca9551", .data = &pca955x_chipdefs[pca9551] },
+ { .compatible = "nxp,pca9552", .data = &pca955x_chipdefs[pca9552] },
+ { .compatible = "ibm,pca9552", .data = &pca955x_chipdefs[ibm_pca9552] },
+ { .compatible = "nxp,pca9553", .data = &pca955x_chipdefs[pca9553] },
+ {}
+};
+MODULE_DEVICE_TABLE(of, of_pca955x_match);
+
static struct i2c_driver pca955x_driver = {
.driver = {
.name = "leds-pca955x",