Get rid of obsolete DECLARE_MUTEX_LOCKED usage.

Call device_create with extra driver data argument (NULL)
on 2.6.27 and later.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@532 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Dotan Barak
2008-10-22 21:45:16 +00:00
parent 80ea13642f
commit d247bbbd5e
2 changed files with 13 additions and 8 deletions
+7 -5
View File
@@ -135,12 +135,18 @@
#define DESTROY_ISP_DEV(isp) \
class_device_destroy(isp_class, MKDEV(MAJOR(isp_dev), (isp)->isp_unit));
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
#define ISP_CLASS struct class
#define CREATE_ISP_CLASS class_create
#define DESTROY_ISP_CLASS class_destroy
#define CREATE_ISP_DEV(i, c) (void) device_create(c, NULL, MKDEV(MAJOR(isp_dev), (i)->isp_unit), "%s%d", ISP_NAME, (i)->isp_unit);
#define DESTROY_ISP_DEV(i) device_destroy(isp_class, MKDEV(MAJOR(isp_dev), (i)->isp_unit));
#else
#define ISP_CLASS struct class
#define CREATE_ISP_CLASS class_create
#define DESTROY_ISP_CLASS class_destroy
#define CREATE_ISP_DEV(i, c) (void) device_create(c, NULL, MKDEV(MAJOR(isp_dev), (i)->isp_unit), NULL, "%s%d", ISP_NAME, (i)->isp_unit);
#define DESTROY_ISP_DEV(i) device_destroy(isp_class, MKDEV(MAJOR(isp_dev), (i)->isp_unit));
#endif
typedef struct scsi_cmnd Scsi_Cmnd;
@@ -194,10 +200,6 @@ typedef struct scsi_host_template Scsi_Host_Template;
#undef max
#endif
#ifndef DECLARE_MUTEX_LOCKED
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
#endif
#define ull unsigned long long
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)