From b2bd846a054cc810b06e61bf6d0e727686bbcdb7 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 15 Aug 2008 20:35:58 +0000 Subject: [PATCH] device_create is not fully functional in linux 2.6.18. --- include/linux/device.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index 7ed524df..2b7a17f2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -103,8 +103,9 @@ static inline void device_destroy(struct class *cs, dev_t devt) class_device_destroy(cs, devt) #else - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) +/* device_create does not work for NULL parent with 2.6.18, not sure +exactly which kernel version it was fixed in. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) #define COMEDI_DEVICE_CREATE(cs, parent, devt, drvdata, fmt...) \ (struct device *)class_device_create( \ -- 2.26.2