[PATCH libdrm 17/24] libkms: annotate private symbols

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 1 09:15:28 PDT 2015


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 libkms/api.c      |  3 +++
 libkms/dumb.c     |  2 +-
 libkms/exynos.c   |  2 +-
 libkms/intel.c    |  2 +-
 libkms/internal.h | 19 ++++++++++++-------
 libkms/linux.c    |  4 ++--
 libkms/nouveau.c  |  2 +-
 libkms/radeon.c   |  2 +-
 libkms/vmwgfx.c   |  2 +-
 9 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/libkms/api.c b/libkms/api.c
index b512c42..a07a242 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -29,9 +29,12 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "libdrm.h"
 #include "internal.h"
 
 int kms_create(int fd, struct kms_driver **out)
diff --git a/libkms/dumb.c b/libkms/dumb.c
index f9c16e1..e252d8c 100644
--- a/libkms/dumb.c
+++ b/libkms/dumb.c
@@ -190,7 +190,7 @@ dumb_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 dumb_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/exynos.c b/libkms/exynos.c
index 1123482..db65f81 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -185,7 +185,7 @@ exynos_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 exynos_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/intel.c b/libkms/intel.c
index 51a7fd2..a539df2 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -216,7 +216,7 @@ intel_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 intel_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/internal.h b/libkms/internal.h
index f831b57..e7d5c46 100644
--- a/libkms/internal.h
+++ b/libkms/internal.h
@@ -29,6 +29,11 @@
 #ifndef INTERNAL_H_
 #define INTERNAL_H_
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "libdrm.h"
 #include "libkms.h"
 
 struct kms_driver
@@ -62,18 +67,18 @@ struct kms_bo
 	unsigned handle;
 };
 
-int linux_create(int fd, struct kms_driver **out);
+drm_private int linux_create(int fd, struct kms_driver **out);
 
-int vmwgfx_create(int fd, struct kms_driver **out);
+drm_private int vmwgfx_create(int fd, struct kms_driver **out);
 
-int intel_create(int fd, struct kms_driver **out);
+drm_private int intel_create(int fd, struct kms_driver **out);
 
-int dumb_create(int fd, struct kms_driver **out);
+drm_private int dumb_create(int fd, struct kms_driver **out);
 
-int nouveau_create(int fd, struct kms_driver **out);
+drm_private int nouveau_create(int fd, struct kms_driver **out);
 
-int radeon_create(int fd, struct kms_driver **out);
+drm_private int radeon_create(int fd, struct kms_driver **out);
 
-int exynos_create(int fd, struct kms_driver **out);
+drm_private int exynos_create(int fd, struct kms_driver **out);
 
 #endif
diff --git a/libkms/linux.c b/libkms/linux.c
index 77a0bbe..06dbc42 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -39,9 +39,9 @@
 #include <xf86drm.h>
 #include <string.h>
 #include <unistd.h>
-
 #include <sys/stat.h>
 
+#include "libdrm.h"
 #include "internal.h"
 
 #define PATH_SIZE 512
@@ -225,7 +225,7 @@ linux_from_udev(int fd, struct kms_driver **out)
 }
 #endif
 
-int
+drm_private int
 linux_create(int fd, struct kms_driver **out)
 {
 	if (!dumb_create(fd, out))
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 228903f..7f57f21 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -198,7 +198,7 @@ nouveau_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 nouveau_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/radeon.c b/libkms/radeon.c
index 9383a0a..f0d5db6 100644
--- a/libkms/radeon.c
+++ b/libkms/radeon.c
@@ -219,7 +219,7 @@ radeon_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 radeon_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index bc04133..3c99ea3 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -185,7 +185,7 @@ vmwgfx_bo_destroy(struct kms_bo *_bo)
 	return 0;
 }
 
-int
+drm_private int
 vmwgfx_create(int fd, struct kms_driver **out)
 {
 	struct kms_driver *kms;
-- 
2.3.1



More information about the dri-devel mailing list