提交 b61abd49 编写于 作者: A Arnd Bergmann 提交者: Daniel Vetter

drm/hisilicon/hibmc: mark PM functions __maybe_unused

When CONFIG_PM_SLEEP is disabled, we get a harmless warning

drm/hisilicon/hibmc/hibmc_drm_drv.c:115:12: error: ‘hibmc_pm_resume’ defined but not used [-Werror=unused-function]
drm/hisilicon/hibmc/hibmc_drm_drv.c:97:12: error: ‘hibmc_pm_suspend’ defined but not used [-Werror=unused-function]

Marking the functions as __maybe_unused avoids the warning without
having to add an #ifdef.

Fixes: 5e0df3a0 ("drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161124163107.3914495-1-arnd@arndb.de
上级 0a4c9ffb
......@@ -94,7 +94,7 @@ static struct drm_driver hibmc_driver = {
.irq_handler = hibmc_drm_interrupt,
};
static int hibmc_pm_suspend(struct device *dev)
static int __maybe_unused hibmc_pm_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
......@@ -112,7 +112,7 @@ static int hibmc_pm_suspend(struct device *dev)
return 0;
}
static int hibmc_pm_resume(struct device *dev)
static int __maybe_unused hibmc_pm_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册