Commit 66d6dd45 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Eric Anholt

drm/pl111: fix warnings without CONFIG_ARM_AMBA

The driver is written in a way to enable compile-testing without CONFIG_ARM_AMBA,
but it just causes needless warnings:

drivers/gpu/drm/pl111/pl111_drv.c:149:26: error: 'pl111_drm_driver' defined but not used [-Werror=unused-variable]
drivers/gpu/drm/pl111/pl111_drv.c:81:12: error: 'pl111_modeset_init' defined but not used [-Werror=unused-function]

This unhides the probe/remove functions again and just leaves the driver
object as unused when CONFIG_ARM_AMBA is disabled, with a __maybe_unused
annotation to shut up the warning.

Fixes: bed41005 ("drm/pl111: Initial drm/kms driver for pl111")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524155020.1777369-1-arnd@arndb.de
parent 91110a4b
...@@ -179,7 +179,6 @@ static struct drm_driver pl111_drm_driver = { ...@@ -179,7 +179,6 @@ static struct drm_driver pl111_drm_driver = {
#endif #endif
}; };
#ifdef CONFIG_ARM_AMBA
static int pl111_amba_probe(struct amba_device *amba_dev, static int pl111_amba_probe(struct amba_device *amba_dev,
const struct amba_id *id) const struct amba_id *id)
{ {
...@@ -252,7 +251,7 @@ static struct amba_id pl111_id_table[] = { ...@@ -252,7 +251,7 @@ static struct amba_id pl111_id_table[] = {
{0, 0}, {0, 0},
}; };
static struct amba_driver pl111_amba_driver = { static struct amba_driver pl111_amba_driver __maybe_unused = {
.drv = { .drv = {
.name = "drm-clcd-pl111", .name = "drm-clcd-pl111",
}, },
...@@ -261,8 +260,9 @@ static struct amba_driver pl111_amba_driver = { ...@@ -261,8 +260,9 @@ static struct amba_driver pl111_amba_driver = {
.id_table = pl111_id_table, .id_table = pl111_id_table,
}; };
#ifdef CONFIG_ARM_AMBA
module_amba_driver(pl111_amba_driver); module_amba_driver(pl111_amba_driver);
#endif /* CONFIG_ARM_AMBA */ #endif
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("ARM Ltd."); MODULE_AUTHOR("ARM Ltd.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment