__drm_legacy_infobufs() and __drm_legacy_mapbufs() are implemented only when CONFIG_DRM_LEGACY is enabled.
Currently the drm_legacy header exposes them indiscriminately.
Fix the issue adding the correct guarding.
Signed-off-by: Vincenzo Frascino vincenzo.frascino@arm.com --- drivers/gpu/drm/drm_legacy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h index 70c9dba114a6..ea2e27be23ce 100644 --- a/drivers/gpu/drm/drm_legacy.h +++ b/drivers/gpu/drm/drm_legacy.h @@ -146,7 +146,6 @@ int drm_legacy_markbufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_freebufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_mapbufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_dma_ioctl(struct drm_device *d, void *v, struct drm_file *f); -#endif
int __drm_legacy_infobufs(struct drm_device *, void *, int *, int (*)(void *, int, struct drm_buf_entry *)); @@ -154,6 +153,7 @@ int __drm_legacy_mapbufs(struct drm_device *, void *, int *, void __user **, int (*)(void *, int, unsigned long, struct drm_buf *), struct drm_file *); +#endif
#if IS_ENABLED(CONFIG_DRM_LEGACY) void drm_legacy_master_rmmaps(struct drm_device *dev,