media: i2c: mt9v111: workaround
cover media: i2c: mt9v111: workaround
Hi all,
This patchset enables module autoloading feature of mt9v111 module and cleans the code up.
Liao Chen (2):
media: i2c: mt9v111: Add missing MODULE_DEVICE_TABLE
media: i2c: mt9v111: drop redundant comma
drivers/media/i2c/mt9v111.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
PATCH 1/2 media: i2c: mt9v111: Enable module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/i2c/mt9v111.c +1 -0
@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = {
Signature · 1 line
2.34.1
Re: [PATCH -next 1/2] media: i2c: mt9v111: Enable module autoloading
Hi Liao,
Thank you for the patch.
Quoted 4 lines · Liao Chen
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>
Sakari, I expect you will merge this series through your tree.
Quoted 16 lines
--- drivers/media/i2c/mt9v111.c | 1 + 1 file changed, 1 insertion(+)drivers/media/i2c/mt9v111.c +1
-0@@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = { { .compatible = "aptina,mt9v111", }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, mt9v111_of_match);static struct i2c_driver mt9v111_driver = { .driver = {
Signature · 3 lines
Regards, Laurent Pinchart
Sakari Ailus
maintainerRe: [PATCH -next 1/2] media: i2c: mt9v111: Enable module autoloading
Quoted 5 lines · Laurent Pinchart
Hi Liao,
Thank you for the patch.
On Thu, Aug 29, 2024 at 12:52:02PM +0000, Liao Chen wrote:
Quoted 8 lines
Quoted 4 lines
Add
MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias fromof_device_idtable.Signed-off-by Liao Chen <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>Sakari, I expect you will merge this series through your tree.
Yes, they were in my previous PR to Hans and in media stage tree now.
Signature · 1 line
Sakari Ailus
PATCH 2/2 media: i2c: mt9v111: Drop redundant comma
In reply to Liao ChenDrop the redundant comma from mt9v111_of_match array to make the code clean.
--- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/mt9v111.c +1 -1
@@ -1263,7 +1263,7 @@ static void mt9v111_remove(struct i2c_client *client)static const struct of_device_id mt9v111_of_match[] = { { .compatible ="aptina,mt9v111" , }, - {/* sentinel */ }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mt9v111_of_match);
Signature · 1 line
2.34.1
RE: [PATCH -next 2/2] media: i2c: mt9v111: Drop redundant comma
Hi Liao Chen,
Quoted 6 lines
-----Original Message-----
From: Liao Chen <[email protected]>
Sent: Thursday, August 29, 2024 1:52 PM
Subject: [PATCH -next 2/2] media: i2c: mt9v111: Drop redundant commaDrop the redundant comma from
mt9v111_of_matcharray to make the code clean.
LGTM.
Actually, Removing the trailing comma in the terminator entry for the ID table making code robust against (theoretical) misrebases or other similar things where the new entry goes _after_ the termination without the compiler noticing."
Quoted 21 lines
Signed-off-by Liao Chen <[email protected]>--- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/mt9v111.c index renamed from drivers/media/i2c/mt9v111.c +0
-0
b6a2623798c5..723fe138e7bc100644drivers/media/i2c/mt9v111.c +1
-2@@ -1263,7 +1263,7 @@ static void mt9v111_remove(struct i2c_client *client)static const struct of_device_id mt9v111_of_match[] = { { .compatible ="aptina,mt9v111" , }, - {/* sentinel */ }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mt9v111_of_match); --2.34.1
Re: [PATCH -next 2/2] media: i2c: mt9v111: Drop redundant comma
In reply to Liao ChenHi Liao,
Thank you for the patch.
Quoted 4 lines · Liao Chen
Drop the redundant comma from
mt9v111_of_matcharray to make the code clean.Signed-off-by Liao Chen <[email protected]>
Quoted 17 lines
--- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/mt9v111.c +1
-1@@ -1263,7 +1263,7 @@ static void mt9v111_remove(struct i2c_client *client)static const struct of_device_id mt9v111_of_match[] = { { .compatible ="aptina,mt9v111" , }, - {/* sentinel */ }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mt9v111_of_match);
Signature · 3 lines
Regards, Laurent Pinchart