diff options
author | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-08-11 23:47:44 +0000 |
---|---|---|
committer | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-08-11 23:47:44 +0000 |
commit | 25557fd8842deca017f8da05da22e1352389f736 (patch) | |
tree | 3f6e52df204b95160858a89f2d0b558ec5277a0d /include/spl-device.h | |
parent | b61a6e8bdc5ca52a09ff02a6ce2e92742725f8cc (diff) |
Sigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@157 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'include/spl-device.h')
-rw-r--r-- | include/spl-device.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/spl-device.h b/include/spl-device.h index 2bbd299b8..d18aedf07 100644 --- a/include/spl-device.h +++ b/include/spl-device.h @@ -9,12 +9,14 @@ #ifdef HAVE_DEVICE_CREATE typedef struct class spl_class; +typedef struct device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ device_create(cls, parent, devt, fmt, ## args) -#define spl_device_destroy(cls, devt) device_destroy(cls, devt) +#define spl_device_destroy(cls, cls_dev, devt) \ + device_destroy(cls, devt) /* * Preferred API from 2.6.13 to 2.6.17 @@ -25,12 +27,14 @@ typedef struct class spl_class; #ifdef HAVE_CLASS_DEVICE_CREATE typedef struct class spl_class; +typedef struct class_device spl_device; #define spl_class_create(mod, name) class_create(mod, name) #define spl_class_destroy(cls) class_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ - class_device_create(cls, parent, devt, device, fmt, ## args) -#define spl_device_destroy(cls, devt) class_device_destroy(cls, devt) +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ + class_device_create(cls, devt, device, fmt, ## args) +#define spl_device_destroy(cls, cls_dev, devt) \ + class_device_unregister(cls_dev) /* * Prefered API from 2.6.0 to 2.6.12 @@ -40,12 +44,14 @@ typedef struct class spl_class; #else /* Legacy API */ typedef struct class_simple spl_class; +typedef struct class_device spl_class_device; #define spl_class_create(mod, name) class_simple_create(mod, name) #define spl_class_destroy(cls) class_simple_destroy(cls) -#define spl_device_create(cls, parent, devt, device, fmt, args...) \ +#define spl_device_create(cls, parent, devt, device, fmt, args...) \ class_simple_device_add(cls, devt, device, fmt, ## args) -#define spl_device_destroy(cls, devt) class_simple_device_remove(devt) +#define spl_device_destroy(cls, cls_dev, devt) \ + class_simple_device_remove(devt) #endif #endif |