From: Thomas Zimmermann Date: Fri, 8 Nov 2024 15:42:39 +0000 (+0100) Subject: drm/fbdev-client: Unexport drm_fbdev_client_setup() X-Git-Tag: block-6.14-20240131~40^2~18^2~104 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7d2faa8dbb7055a115fe0cd6068d7090094a573d;p=linux-block.git drm/fbdev-client: Unexport drm_fbdev_client_setup() DRM drivers invoke drm_client_setup() to set up in-kernel clients. No driver should call drm_fbdev_client_setup() directly. Therefore, unexport the symbol and move the declaration to the internal header drm_client_internal.h. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-4-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/clients/drm_client_internal.h b/drivers/gpu/drm/clients/drm_client_internal.h new file mode 100644 index 000000000000..23258934956a --- /dev/null +++ b/drivers/gpu/drm/clients/drm_client_internal.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_CLIENT_INTERNAL_H +#define DRM_CLIENT_INTERNAL_H + +struct drm_device; +struct drm_format_info; + +#ifdef CONFIG_DRM_FBDEV_EMULATION +int drm_fbdev_client_setup(struct drm_device *dev, const struct drm_format_info *format); +#else +static inline int drm_fbdev_client_setup(struct drm_device *dev, + const struct drm_format_info *format) +{ + return 0; +} +#endif + +#endif diff --git a/drivers/gpu/drm/clients/drm_client_setup.c b/drivers/gpu/drm/clients/drm_client_setup.c index c6a295d5de50..4b211a4812b5 100644 --- a/drivers/gpu/drm/clients/drm_client_setup.c +++ b/drivers/gpu/drm/clients/drm_client_setup.c @@ -2,10 +2,11 @@ #include #include -#include #include #include +#include "drm_client_internal.h" + /** * drm_client_setup() - Setup in-kernel DRM clients * @dev: DRM device diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c index 246fb63ab250..f894ba52bdb5 100644 --- a/drivers/gpu/drm/clients/drm_fbdev_client.c +++ b/drivers/gpu/drm/clients/drm_fbdev_client.c @@ -3,11 +3,12 @@ #include #include #include -#include #include #include #include +#include "drm_client_internal.h" + /* * struct drm_client_funcs */ @@ -164,4 +165,3 @@ err_drm_client_init: kfree(fb_helper); return ret; } -EXPORT_SYMBOL(drm_fbdev_client_setup); diff --git a/include/drm/drm_fbdev_client.h b/include/drm/drm_fbdev_client.h deleted file mode 100644 index e11a5614f127..000000000000 --- a/include/drm/drm_fbdev_client.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: MIT */ - -#ifndef DRM_FBDEV_CLIENT_H -#define DRM_FBDEV_CLIENT_H - -struct drm_device; -struct drm_format_info; - -#ifdef CONFIG_DRM_FBDEV_EMULATION -int drm_fbdev_client_setup(struct drm_device *dev, const struct drm_format_info *format); -#else -static inline int drm_fbdev_client_setup(struct drm_device *dev, - const struct drm_format_info *format) -{ - return 0; -} -#endif - -#endif