OSDN Git Service

media: ov2740: make ov2740 driver only work with ACPI
authorBingbu Cao <bingbu.cao@intel.com>
Thu, 4 Jun 2020 01:25:19 +0000 (03:25 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 23 Jun 2020 13:14:59 +0000 (15:14 +0200)
As the ACPI id of ov2740 camera sensor was registered as "INT3474",
current ov2740 driver is supposed to be working with ACPI only.

Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/Kconfig
drivers/media/i2c/ov2740.c

index da11036..6804ad5 100644 (file)
@@ -860,6 +860,7 @@ config VIDEO_OV2685
 config VIDEO_OV2740
        tristate "OmniVision OV2740 sensor support"
        depends on VIDEO_V4L2 && I2C
+       depends on ACPI || COMPILE_TEST
        select MEDIA_CONTROLLER
        select VIDEO_V4L2_SUBDEV_API
        select V4L2_FWNODE
index 2dd2609..33025c6 100644 (file)
@@ -988,20 +988,18 @@ static const struct dev_pm_ops ov2740_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(ov2740_suspend, ov2740_resume)
 };
 
-#ifdef CONFIG_ACPI
 static const struct acpi_device_id ov2740_acpi_ids[] = {
        {"INT3474"},
        {}
 };
 
 MODULE_DEVICE_TABLE(acpi, ov2740_acpi_ids);
-#endif
 
 static struct i2c_driver ov2740_i2c_driver = {
        .driver = {
                .name = "ov2740",
                .pm = &ov2740_pm_ops,
-               .acpi_match_table = ACPI_PTR(ov2740_acpi_ids),
+               .acpi_match_table = ov2740_acpi_ids,
        },
        .probe_new = ov2740_probe,
        .remove = ov2740_remove,