Module Name:    src
Committed By:   christos
Date:           Tue Dec  2 21:49:36 UTC 2014

Modified Files:
        src/sys/external/bsd/drm2/dist/drm: drm_stub.c
        src/sys/external/bsd/drm2/dist/include/drm: drmP.h

Log Message:
fix debugging compilation (ALL kernel)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/drm_stub.c
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/dist/include/drm/drmP.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/drm_stub.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.7 src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.8
--- src/sys/external/bsd/drm2/dist/drm/drm_stub.c:1.7	Sat Nov 22 14:18:07 2014
+++ src/sys/external/bsd/drm2/dist/drm/drm_stub.c	Tue Dec  2 16:49:36 2014
@@ -341,7 +341,9 @@ static int drm_minor_register(struct drm
 {
 	struct drm_minor *new_minor;
 	unsigned long flags;
+#ifndef __NetBSD__
 	int ret;
+#endif
 	int minor_id;
 
 	DRM_DEBUG("\n");
@@ -365,6 +367,7 @@ static int drm_minor_register(struct drm
 
 	new_minor->index = minor_id;
 
+#ifndef __NetBSD__
 	ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root);
 	if (ret) {
 		DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
@@ -376,7 +379,7 @@ static int drm_minor_register(struct drm
 		DRM_ERROR("DRM: Error sysfs_device_add.\n");
 		goto err_debugfs;
 	}
-
+#endif
 	/* replace NULL with @minor so lookups will succeed from now on */
 	spin_lock_irqsave(&drm_minor_lock, flags);
 	idr_replace(&drm_minors_idr, new_minor, new_minor->index);
@@ -385,6 +388,7 @@ static int drm_minor_register(struct drm
 	DRM_DEBUG("new minor assigned %d\n", minor_id);
 	return 0;
 
+#ifndef __NetBSD__
 err_debugfs:
 	drm_debugfs_cleanup(new_minor);
 err_id:
@@ -393,6 +397,7 @@ err_id:
 	spin_unlock_irqrestore(&drm_minor_lock, flags);
 	new_minor->index = 0;
 	return ret;
+#endif
 }
 
 static void drm_minor_unregister(struct drm_device *dev, unsigned int type)

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.8 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.9
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.8	Sat Nov 22 14:18:07 2014
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Tue Dec  2 16:49:36 2014
@@ -1637,9 +1637,10 @@ extern unsigned int drm_timestamp_precis
 extern unsigned int drm_timestamp_monotonic;
 
 extern struct class *drm_class;
+#ifndef __NetBSD__
 extern struct dentry *drm_debugfs_root;
 
-#ifdef __NetBSD__
+#else
 extern spinlock_t drm_minor_lock;
 #endif
 extern struct idr drm_minors_idr;

Reply via email to