Re: [GDTH] Remove pre 2.6 ifdefs

2007-10-09 Thread Matthew Wilcox
On Tue, Oct 09, 2007 at 04:43:14PM -0400, Dave Jones wrote:
> Signed-off-by: Dave Jones <[EMAIL PROTECTED]>

These have already been taken care of; see
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=shortlog;h=gdth

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GDTH] Remove pre 2.6 ifdefs

2007-10-09 Thread Dave Jones
Signed-off-by: Dave Jones <[EMAIL PROTECTED]>

diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 55e4d2d..bfba877 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -392,12 +392,7 @@
 #include 
 #include 
 #include 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)
 #include 
-#else
-#define DMA_32BIT_MASK 0xULL
-#define DMA_64BIT_MASK 0xULL
-#endif
 
 #ifdef GDTH_RTC
 #include 
@@ -409,12 +404,7 @@
 #include 
 #include 
 #include 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 #include 
-#else
-#include 
-#include "sd.h"
-#endif
 
 #include "scsi.h"
 #include 
@@ -655,7 +645,6 @@ static int probe_eisa_isa = 0;
 static int force_dma32 = 0;
 
 /* parameters for modprobe/insmod */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
 module_param_array(irq, int, NULL, 0);
 module_param(disable, int, 0);
 module_param(reserve_mode, int, 0);
@@ -668,20 +657,7 @@ module_param(virt_ctr, int, 0);
 module_param(shared_access, int, 0);
 module_param(probe_eisa_isa, int, 0);
 module_param(force_dma32, int, 0);
-#else
-MODULE_PARM(irq, "i");
-MODULE_PARM(disable, "i");
-MODULE_PARM(reserve_mode, "i");
-MODULE_PARM(reserve_list, "4-" __MODULE_STRING(MAX_RES_ARGS) "i");
-MODULE_PARM(reverse_scan, "i");
-MODULE_PARM(hdr_channel, "i");
-MODULE_PARM(max_ids, "i");
-MODULE_PARM(rescan, "i");
-MODULE_PARM(virt_ctr, "i");
-MODULE_PARM(shared_access, "i");
-MODULE_PARM(probe_eisa_isa, "i");
-MODULE_PARM(force_dma32, "i");
-#endif
+
 MODULE_AUTHOR("Achim Leubner");
 MODULE_LICENSE("GPL");
 
@@ -710,7 +686,6 @@ static void gdth_delay(int milliseconds)
 }
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 static void gdth_scsi_done(struct scsi_cmnd *scp)
 {
 TRACE2(("gdth_scsi_done()\n"));
@@ -748,42 +723,6 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str 
*gdtcmd, char *cmnd,
 kfree(scp);
 return rval;
 }
-#else
-static void gdth_scsi_done(Scsi_Cmnd *scp)
-{
-TRACE2(("gdth_scsi_done()\n"));
-
-scp->request.rq_status = RQ_SCSI_DONE;
-if (scp->request.waiting)
-complete(scp->request.waiting);
-}
-
-int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
-   int timeout, u32 *info)
-{
-Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE);
-unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0;
-DECLARE_COMPLETION_ONSTACK(wait);
-int rval;
-
-if (!scp)
-return -ENOMEM;
-scp->cmd_len = 12;
-scp->use_sg = 0;
-scp->SCp.this_residual = IOCTL_PRI;   /* priority */
-scp->request.rq_status = RQ_SCSI_BUSY;
-scp->request.waiting = &wait;
-scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1);
-wait_for_completion(&wait);
-
-rval = scp->SCp.Status;
-if (info)
-*info = scp->SCp.Message;
-
-scsi_release_command(scp);
-return rval;
-}
-#endif
 
 int gdth_execute(struct Scsi_Host *shost, gdth_cmd_str *gdtcmd, char *cmnd,
  int timeout, u32 *info)
@@ -2243,29 +2182,17 @@ static int __init gdth_search_drives(int hanum)
 printk("GDT-HA %d: Vendor: %s Name: %s\n",
hanum,oemstr->text.oem_company_name,ha->binfo.type_string);
 /* Save the Host Drive inquiry data */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 strlcpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id,
 sizeof(ha->oem_name));
-#else
-strncpy(ha->oem_name,oemstr->text.scsi_host_drive_inquiry_vendor_id,7);
-ha->oem_name[7] = '\0';
-#endif
 } else {
 /* Old method, based on PCI ID */
 TRACE2(("gdth_search_drives(): CACHE_READ_OEM_STRING_RECORD 
failed\n"));
 printk("GDT-HA %d: Name: %s\n",
hanum,ha->binfo.type_string);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 if (ha->oem_id == OEM_ID_INTEL)
 strlcpy(ha->oem_name,"Intel  ", sizeof(ha->oem_name));
 else
 strlcpy(ha->oem_name,"ICP", sizeof(ha->oem_name));
-#else 
-if (ha->oem_id == OEM_ID_INTEL)
-strcpy(ha->oem_name,"Intel  ");
-else
-strcpy(ha->oem_name,"ICP");
-#endif
 }
 
 /* scanning for host drives */
@@ -2674,17 +2601,10 @@ static void gdth_copy_internal_data(int hanum,Scsi_Cmnd 
*scp,
 return;
 }
 local_irq_save(flags);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 address = kmap_atomic(sl->page, KM_BIO_SRC_IRQ) + sl->offset;
 memcpy(address,buffer,cpnow);
 flush_dcache_page(sl->page);
 kunmap_atomic(address, KM_BIO_SRC_IRQ);
-#else
-address = kmap_atomic(sl->page, KM_BH_IRQ) + sl->offset;
-memcpy(address,buffer,cpnow);
-flush_dcache_page(sl->page);
-kunmap_atomic(address, KM_BH_IRQ);
-#endif
 local_irq_restore(flags);
 if (cpsum == cpcount)
 break;
@@ -4277,11 +4197,7 @@ int