diff --git a/scst/src/dev_handlers/scst_changer.c b/scst/src/dev_handlers/scst_changer.c index 53b693360..31b625c09 100644 --- a/scst/src/dev_handlers/scst_changer.c +++ b/scst/src/dev_handlers/scst_changer.c @@ -83,12 +83,7 @@ static int changer_attach(struct scst_device *dev) do { TRACE_DBG("%s", "Doing TEST_UNIT_READY"); rc = scsi_test_unit_ready(dev->scsi_dev, - SCST_GENERIC_CHANGER_TIMEOUT, CHANGER_RETRIES -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - ); -#else - , NULL); -#endif + SCST_GENERIC_CHANGER_TIMEOUT, CHANGER_RETRIES, NULL); TRACE_DBG("TEST_UNIT_READY done: %x", rc); } while ((--retries > 0) && rc); diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index e841db45c..c42c5d6c4 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -200,8 +200,6 @@ static int disk_done(struct scst_cmd *cmd) return res; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) - static bool disk_on_sg_tablesize_low(struct scst_cmd *cmd) { bool res; @@ -466,7 +464,6 @@ out_error: goto out_done; } -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) */ static enum scst_exec_res disk_perf_exec(struct scst_cmd *cmd) { @@ -517,10 +514,8 @@ static struct scst_dev_type disk_devtype = { .attach = disk_attach, .detach = disk_detach, .parse = disk_parse, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) .exec = disk_exec, .on_sg_tablesize_low = disk_on_sg_tablesize_low, -#endif .dev_done = disk_done, #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) .default_trace_flags = SCST_DEFAULT_DEV_LOG_FLAGS, @@ -538,9 +533,7 @@ static struct scst_dev_type disk_devtype_perf = { .parse = disk_parse, .exec = disk_perf_exec, .dev_done = disk_done, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) .on_sg_tablesize_low = disk_on_sg_tablesize_low, -#endif #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) .default_trace_flags = SCST_DEFAULT_DEV_LOG_FLAGS, .trace_flags = &trace_flag, diff --git a/scst/src/dev_handlers/scst_processor.c b/scst/src/dev_handlers/scst_processor.c index db259b9cd..d87abc5ea 100644 --- a/scst/src/dev_handlers/scst_processor.c +++ b/scst/src/dev_handlers/scst_processor.c @@ -83,12 +83,7 @@ static int processor_attach(struct scst_device *dev) do { TRACE_DBG("%s", "Doing TEST_UNIT_READY"); rc = scsi_test_unit_ready(dev->scsi_dev, - SCST_GENERIC_PROCESSOR_TIMEOUT, PROCESSOR_RETRIES -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - ); -#else - , NULL); -#endif + SCST_GENERIC_PROCESSOR_TIMEOUT, PROCESSOR_RETRIES, NULL); TRACE_DBG("TEST_UNIT_READY done: %x", rc); } while ((--retries > 0) && rc); diff --git a/scst/src/dev_handlers/scst_raid.c b/scst/src/dev_handlers/scst_raid.c index 84f647a6e..4a0938ffd 100644 --- a/scst/src/dev_handlers/scst_raid.c +++ b/scst/src/dev_handlers/scst_raid.c @@ -83,12 +83,7 @@ static int raid_attach(struct scst_device *dev) do { TRACE_DBG("%s", "Doing TEST_UNIT_READY"); rc = scsi_test_unit_ready(dev->scsi_dev, - SCST_GENERIC_RAID_TIMEOUT, RAID_RETRIES -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - ); -#else - , NULL); -#endif + SCST_GENERIC_RAID_TIMEOUT, RAID_RETRIES, NULL); TRACE_DBG("TEST_UNIT_READY done: %x", rc); } while ((--retries > 0) && rc); diff --git a/scst/src/dev_handlers/scst_tape.c b/scst/src/dev_handlers/scst_tape.c index 9d0cc4a2c..1bb030180 100644 --- a/scst/src/dev_handlers/scst_tape.c +++ b/scst/src/dev_handlers/scst_tape.c @@ -159,12 +159,7 @@ static int tape_attach(struct scst_device *dev) do { TRACE_DBG("%s", "Doing TEST_UNIT_READY"); rc = scsi_test_unit_ready(dev->scsi_dev, - SCST_GENERIC_TAPE_SMALL_TIMEOUT, TAPE_RETRIES -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - ); -#else - , NULL); -#endif + SCST_GENERIC_TAPE_SMALL_TIMEOUT, TAPE_RETRIES, NULL); TRACE_DBG("TEST_UNIT_READY done: %x", rc); } while ((--retries > 0) && rc); diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index f5b7d74d3..0ceb8d275 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -4120,11 +4120,7 @@ static int __init init_scst_user(void) struct scst_user_reply_cmd r; }; }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) - struct class_device *class_member; -#else struct device *dev; -#endif TRACE_ENTRY(); @@ -4174,25 +4170,14 @@ static int __init init_scst_user(void) goto out_class; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) - class_member = class_device_create(dev_user_sysfs_class, NULL, - MKDEV(dev_user_major, 0), NULL, DEV_USER_NAME); - if (IS_ERR(class_member)) { - res = PTR_ERR(class_member); - goto out_chrdev; - } -#else dev = device_create(dev_user_sysfs_class, NULL, MKDEV(dev_user_major, 0), -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) NULL, -#endif DEV_USER_NAME); if (IS_ERR(dev)) { res = PTR_ERR(dev); goto out_chrdev; } -#endif cleanup_thread = kthread_run(dev_user_cleanup_thread, NULL, "scst_usr_cleanupd"); @@ -4207,11 +4192,7 @@ out: return res; out_dev: -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) - class_device_destroy(dev_user_sysfs_class, MKDEV(dev_user_major, 0)); -#else device_destroy(dev_user_sysfs_class, MKDEV(dev_user_major, 0)); -#endif out_chrdev: unregister_chrdev(dev_user_major, DEV_USER_NAME); @@ -4242,11 +4223,7 @@ static void __exit exit_scst_user(void) TRACE_MGMT_DBG("kthread_stop() failed: %d", rc); unregister_chrdev(dev_user_major, DEV_USER_NAME); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) - class_device_destroy(dev_user_sysfs_class, MKDEV(dev_user_major, 0)); -#else device_destroy(dev_user_sysfs_class, MKDEV(dev_user_major, 0)); -#endif class_destroy(dev_user_sysfs_class); scst_unregister_virtual_dev_driver(&dev_user_devtype);