Skip to contentSkip to conversation

media: i2c: mt9v111: workaround

PATCH In review Liao Chen 4 participants 7 messages Aug 29, 2024 – Sep 3, 2024

Subsystems (3)
lore
Share & tools
lore

Liao Chen

author
#0 lore raw

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
author
#1 lore raw

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
index b0b98ed3c150..b6a2623798c5 100644
@@ -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
Reviewed-by on v1 1/2
#2 lore raw

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 from of_device_id table.

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
index b0b98ed3c150..b6a2623798c5 100644
@@ -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
maintainer
#3 lore raw

Re: [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 from of_device_id table.

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
author
#4 lore raw

PATCH 2/2 media: i2c: mt9v111: Drop redundant comma

In reply to Liao Chen

Drop 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
index b6a2623798c5..723fe138e7bc 100644
@@ -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
Reviewed-by on v1 2/2
#5 lore raw

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 comma

Drop the redundant comma from mt9v111_of_match array 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
---
 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..723fe138e7bc 100644

drivers/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

Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH -next 2/2] media: i2c: mt9v111: Drop redundant comma

In reply to Liao Chen

Hi Liao,

Thank you for the patch.

Quoted 4 lines · Liao Chen

Drop the redundant comma from mt9v111_of_match array to make the code clean.

Quoted 17 lines
---
 drivers/media/i2c/mt9v111.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/mt9v111.c +1 -1
index b6a2623798c5..723fe138e7bc 100644
@@ -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