Skip to contentSkip to conversation

Building with new kernels

PATCH Rupert Swarbrick 1 participant 1 message May 9, 2009

lore
Share & tools
lore
#0 lore raw

There have been two kernel changes recently which stop the nouveau drm
building: irqreturn.h has lost the IRQ_HANDLED #define and the device struct has lost bus_id.

There is a trivial fix for the first problem: just check for either the old or the new name in drm_os_linux.h.

For the second, the patch I'm attaching uses dev_set_name instead of the (removed) bus_id. The dev_set_name function was added for 2.6.26, but I don't know if that's too new: if so you need to do some sort of versioning macros to use the right method I guess.

Anyway, this got things working here (and I'm running the result whilst writing this!)

Rupert

linux-core/drm_os_linux.h +1 -1
index f58296b..48af5b2 100644
@@ -32,7 +32,7 @@
 /** IRQ handler arguments and return type and values */
 #define DRM_IRQ_ARGS		int irq, void *arg
 /** backwards compatibility with old irq return values */
-#ifndef IRQ_HANDLED
+#if !( defined(IRQ_RETVAL) || defined(IRQ_HANDLED) )
 typedef void irqreturn_t;
 #define IRQ_HANDLED		/* nothing */
 #define IRQ_NONE		/* nothing */
linux-core/drm_sysfs.c +1 -1
index 6de9367..79a4489 100644
@@ -169,7 +169,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
 	minor->kdev.devt = minor->device;
 	minor_str = "card%d";
 	
-	snprintf(minor->kdev.bus_id, BUS_ID_SIZE, minor_str, minor->index);
+	dev_set_name(&minor->kdev, minor_str, minor->index);
 
 	err = device_register(&minor->kdev);
 	if (err) {

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau