OSDN Git Service

media: i2c: imx355: silence unused acpi_device_id warning
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 21 Sep 2020 16:23:24 +0000 (18:23 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:11 +0000 (10:31 +0100)
If driver is built without ACPI, the struct acpi_device_id won't be
used:

  drivers/media/i2c/imx355.c:1836:36: warning:
    'imx355_acpi_ids' defined but not used [-Wunused-const-variable=]

[Sakari Ailus: Added a space before __maybe_unused]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/imx355.c

index 51245e7..700f746 100644 (file)
@@ -1833,7 +1833,7 @@ static const struct dev_pm_ops imx355_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(imx355_suspend, imx355_resume)
 };
 
-static const struct acpi_device_id imx355_acpi_ids[] = {
+static const struct acpi_device_id imx355_acpi_ids[] __maybe_unused = {
        { "SONY355A" },
        { /* sentinel */ }
 };