Skip to content

Commit 66d6dd4

Browse files
arndbanholt
authored andcommitted
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: bed4100 ("drm/pl111: Initial drm/kms driver for pl111") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170524155020.1777369-1-arnd@arndb.de
1 parent 91110a4 commit 66d6dd4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/gpu/drm/pl111/pl111_drv.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ static struct drm_driver pl111_drm_driver = {
179179
#endif
180180
};
181181

182-
#ifdef CONFIG_ARM_AMBA
183182
static int pl111_amba_probe(struct amba_device *amba_dev,
184183
const struct amba_id *id)
185184
{
@@ -252,7 +251,7 @@ static struct amba_id pl111_id_table[] = {
252251
{0, 0},
253252
};
254253

255-
static struct amba_driver pl111_amba_driver = {
254+
static struct amba_driver pl111_amba_driver __maybe_unused = {
256255
.drv = {
257256
.name = "drm-clcd-pl111",
258257
},
@@ -261,8 +260,9 @@ static struct amba_driver pl111_amba_driver = {
261260
.id_table = pl111_id_table,
262261
};
263262

263+
#ifdef CONFIG_ARM_AMBA
264264
module_amba_driver(pl111_amba_driver);
265-
#endif /* CONFIG_ARM_AMBA */
265+
#endif
266266

267267
MODULE_DESCRIPTION(DRIVER_DESC);
268268
MODULE_AUTHOR("ARM Ltd.");

0 commit comments

Comments
 (0)