OSDN Git Service

media: intel-ipu3: cio2: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Wed, 3 Jan 2018 09:27:26 +0000 (04:27 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 5 Jan 2018 17:41:13 +0000 (12:41 -0500)
When CONFIG_PM is disabled, we get harmless warnings about the
suspend/resume callbacks being unused:

drivers/media/pci/intel/ipu3/ipu3-cio2.c:1993:12: error: 'cio2_resume' defined but not used [-Werror=unused-function]
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1967:12: error: 'cio2_suspend' defined but not used [-Werror=unused-function]

This marks them as __maybe_unused to shut up the warnings.

Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/intel/ipu3/ipu3-cio2.c

index 52827d5..9b9ad77 100644 (file)
@@ -1961,7 +1961,7 @@ static void cio2_fbpt_rearrange(struct cio2_device *cio2, struct cio2_queue *q)
                cio2_fbpt_entry_enable(cio2, q->fbpt + i * CIO2_MAX_LOPS);
 }
 
-static int cio2_suspend(struct device *dev)
+static int __maybe_unused cio2_suspend(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
        struct cio2_device *cio2 = pci_get_drvdata(pci_dev);
@@ -1987,7 +1987,7 @@ static int cio2_suspend(struct device *dev)
        return 0;
 }
 
-static int cio2_resume(struct device *dev)
+static int __maybe_unused cio2_resume(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
        struct cio2_device *cio2 = pci_get_drvdata(pci_dev);