drm/fbdev-client: Unexport drm_fbdev_client_setup()
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 8 Nov 2024 15:42:39 +0000 (16:42 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 15 Nov 2024 08:42:21 +0000 (09:42 +0100)
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 <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-4-tzimmermann@suse.de
drivers/gpu/drm/clients/drm_client_internal.h [new file with mode: 0644]
drivers/gpu/drm/clients/drm_client_setup.c
drivers/gpu/drm/clients/drm_fbdev_client.c
include/drm/drm_fbdev_client.h [deleted file]

diff --git a/drivers/gpu/drm/clients/drm_client_internal.h b/drivers/gpu/drm/clients/drm_client_internal.h
new file mode 100644 (file)
index 0000000..2325893
--- /dev/null
@@ -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
index c6a295d5de50c749cfaae3609339c7b8d656379c..4b211a4812b5b36c28de3d52abb924121bc90f12 100644 (file)
@@ -2,10 +2,11 @@
 
 #include <drm/clients/drm_client_setup.h>
 #include <drm/drm_device.h>
-#include <drm/drm_fbdev_client.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_print.h>
 
+#include "drm_client_internal.h"
+
 /**
  * drm_client_setup() - Setup in-kernel DRM clients
  * @dev: DRM device
index 246fb63ab250546dd576e93f9fc03761f6c51614..f894ba52bdb516cdd5b30cc709126c223956f17b 100644 (file)
@@ -3,11 +3,12 @@
 #include <drm/drm_client.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_client.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_print.h>
 
+#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 (file)
index e11a561..0000000
+++ /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