[git:media_stage/master] media: i2c: adv7180: Drop CONFIG_OF ifdeffery

2023-10-07 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: adv7180: Drop CONFIG_OF ifdeffery
Author:  Biju Das 
Date:Sun Sep 10 16:22:00 2023 +0100

Drop of_match_ptr() from adv7180_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of adv7180_driver on non-OF
system and shouldn't be an issue.

Add mod_devicetable.h include.

It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.

Signed-off-by: Biju Das 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/adv7180.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index fc4f29e74e05..54134473186b 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2013 Cogent Embedded, Inc.
  * Copyright (C) 2013 Renesas Solutions Corp.
  */
+#include 
 #include 
 #include 
 #include 
@@ -1584,7 +1585,6 @@ static const struct i2c_device_id adv7180_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, adv7180_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id adv7180_of_id[] = {
{ .compatible = "adi,adv7180", _info },
{ .compatible = "adi,adv7180cp", _info },
@@ -1600,13 +1600,12 @@ static const struct of_device_id adv7180_of_id[] = {
{}
 };
 MODULE_DEVICE_TABLE(of, adv7180_of_id);
-#endif
 
 static struct i2c_driver adv7180_driver = {
.driver = {
   .name = KBUILD_MODNAME,
   .pm = ADV7180_PM_OPS,
-  .of_match_table = of_match_ptr(adv7180_of_id),
+  .of_match_table = adv7180_of_id,
   },
.probe = adv7180_probe,
.remove = adv7180_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: i2c: adv7180: Drop CONFIG_OF ifdeffery

2023-10-03 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: adv7180: Drop CONFIG_OF ifdeffery
Author:  Biju Das 
Date:Sun Sep 10 16:22:00 2023 +0100

Drop of_match_ptr() from adv7180_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of adv7180_driver on non-OF
system and shouldn't be an issue.

Add mod_devicetable.h include.

It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.

Signed-off-by: Biju Das 
Reviewed-by: Jacopo Mondi 
Signed-off-by: Hans Verkuil 

 drivers/media/i2c/adv7180.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index fc4f29e74e05..54134473186b 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2013 Cogent Embedded, Inc.
  * Copyright (C) 2013 Renesas Solutions Corp.
  */
+#include 
 #include 
 #include 
 #include 
@@ -1584,7 +1585,6 @@ static const struct i2c_device_id adv7180_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, adv7180_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id adv7180_of_id[] = {
{ .compatible = "adi,adv7180", _info },
{ .compatible = "adi,adv7180cp", _info },
@@ -1600,13 +1600,12 @@ static const struct of_device_id adv7180_of_id[] = {
{}
 };
 MODULE_DEVICE_TABLE(of, adv7180_of_id);
-#endif
 
 static struct i2c_driver adv7180_driver = {
.driver = {
   .name = KBUILD_MODNAME,
   .pm = ADV7180_PM_OPS,
-  .of_match_table = of_match_ptr(adv7180_of_id),
+  .of_match_table = adv7180_of_id,
   },
.probe = adv7180_probe,
.remove = adv7180_remove,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits