[Linux1394-cvslog] rev 707 - branches/linux-2.4
Brought to you by:
aeb,
bencollins
From: SVN U. <ano...@li...> - 2002-12-22 14:50:48
|
Author: anonymous Date: 2002-12-17 10:53:44 -0500 (Tue, 17 Dec 2002) New Revision: 707 Modified: branches/linux-2.4/amdtp.c branches/linux-2.4/ieee1394_types.h branches/linux-2.4/sbp2.c branches/linux-2.4/sbp2.h branches/linux-2.4/video1394.c Log: Since this is 2.4 only, remove some compatibility stuff. This branch wont work on 2.5.x anyway Modified: branches/linux-2.4/amdtp.c ============================================================================== --- branches/linux-2.4/amdtp.c (original) +++ branches/linux-2.4/amdtp.c 2002-12-22 09:50:16.000000000 -0500 @@ -834,12 +834,8 @@ max_packet_size = max_nevents * s->dimension * 4 + 8; s->packet_pool = pci_pool_create("packet pool", s->host->ohci->dev, - max_packet_size, 0, 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) - ,SLAB_KERNEL); -#else - ); -#endif + max_packet_size, 0, 0 ,SLAB_KERNEL); + if (s->packet_pool == NULL) return -1; @@ -1025,12 +1021,7 @@ s->descriptor_pool = pci_pool_create("descriptor pool", host->ohci->dev, sizeof(struct descriptor_block), - 16, 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,40) - ,SLAB_KERNEL); -#else - ); -#endif + 16, 0, SLAB_KERNEL); if (s->descriptor_pool == NULL) { kfree(s->input); Modified: branches/linux-2.4/sbp2.c ============================================================================== --- branches/linux-2.4/sbp2.c (original) +++ branches/linux-2.4/sbp2.c 2002-12-22 09:50:16.000000000 -0500 @@ -3054,15 +3054,9 @@ /* * Tell scsi stack that we're done with this command */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) spin_lock_irq(&io_request_lock); done (SCpnt); spin_unlock_irq(&io_request_lock); -#else - spin_lock_irq(hi->scsi_host->host_lock); - done (SCpnt); - spin_unlock_irq(hi->scsi_host->host_lock); -#endif return; } @@ -3139,11 +3133,7 @@ /* * Called by scsi stack to get bios parameters (used by fdisk, and at boot). */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) -#else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]) -#endif { int heads, sectors, cylinders; @@ -3180,13 +3170,9 @@ * we register a scsi host with the scsi stack. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) spin_unlock_irq(&io_request_lock); sbp2_init(); spin_lock_irq(&io_request_lock); -#else - sbp2_init(); -#endif /* We return the number of hosts registered. */ return scsi_driver_template.present; @@ -3244,9 +3230,7 @@ .this_id = -1, .sg_tablesize = SBP2_MAX_SG_ELEMENTS, .use_clustering = SBP2_CLUSTERING, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) .use_new_eh_code = TRUE, -#endif .emulated = 1, .proc_name = SBP2_DEVICE_NAME, }; Modified: branches/linux-2.4/sbp2.h ============================================================================== --- branches/linux-2.4/sbp2.h (original) +++ branches/linux-2.4/sbp2.h 2002-12-22 09:50:16.000000000 -0500 @@ -23,13 +23,8 @@ #define SBP2_H /* Some compatibility code */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #define SCSI_REGISTER_HOST(tmpl) scsi_register_module(MODULE_SCSI_HA, tmpl) #define SCSI_UNREGISTER_HOST(tmpl) scsi_unregister_module(MODULE_SCSI_HA, tmpl) -#else -#define SCSI_REGISTER_HOST(tmpl) scsi_register_host(tmpl) -#define SCSI_UNREGISTER_HOST(tmpl) scsi_unregister_host(tmpl) -#endif #define SBP2_DEVICE_NAME "sbp2" #define SBP2_DEVICE_NAME_SIZE 4 @@ -549,11 +544,7 @@ static int sbp2scsi_detect (Scsi_Host_Template *tpnt); static const char *sbp2scsi_info (struct Scsi_Host *host); void sbp2scsi_setup(char *str, int *ints); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]); -#else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]); -#endif static int sbp2scsi_abort (Scsi_Cmnd *SCpnt); static int sbp2scsi_reset (Scsi_Cmnd *SCpnt); static int sbp2scsi_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)); Modified: branches/linux-2.4/ieee1394_types.h ============================================================================== --- branches/linux-2.4/ieee1394_types.h (original) +++ branches/linux-2.4/ieee1394_types.h 2002-12-22 09:50:16.000000000 -0500 @@ -29,9 +29,7 @@ #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,5) #define pte_offset_kernel pte_offset -#endif #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) @@ -42,8 +40,6 @@ #endif -/* Compatibility for task/work queues */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,42) /* Use task queue */ #include <linux/tqueue.h> #define hpsb_queue_struct tq_struct @@ -51,15 +47,6 @@ #define hpsb_schedule_work(x) schedule_task(x) #define HPSB_INIT_WORK(x,y,z) INIT_TQUEUE(x,y,z) #define HPSB_PREPARE_WORK(x,y,z) PREPARE_TQUEUE(x,y,z) -#else -/* Use work queue */ -#include <linux/workqueue.h> -#define hpsb_queue_struct work_struct -#define hpsb_queue_list entry -#define hpsb_schedule_work(x) schedule_work(x) -#define HPSB_INIT_WORK(x,y,z) INIT_WORK(x,y,z) -#define HPSB_PREPARE_WORK(x,y,z) PREPARE_WORK(x,y,z) -#endif typedef u32 quadlet_t; Modified: branches/linux-2.4/video1394.c ============================================================================== --- branches/linux-2.4/video1394.c (original) +++ branches/linux-2.4/video1394.c 2002-12-22 09:50:16.000000000 -0500 @@ -64,13 +64,8 @@ #define vmalloc_32(x) vmalloc(x) #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3)) #define remap_page_range_1394(vma, start, addr, size, prot) \ remap_page_range(start, addr, size, prot) -#else -#define remap_page_range_1394(vma, start, addr, size, prot) \ - remap_page_range(vma, start, addr, size, prot) -#endif struct it_dma_prg { struct dma_cmd begin; @@ -558,11 +553,7 @@ if (d->ir_prg[i][d->nb_cmd-1].status & cpu_to_le32(0xFFFF0000)) { reset_ir_status(d, i); d->buffer_status[i] = VIDEO1394_BUFFER_READY; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) - get_fast_time(&d->buffer_time[i]); -#else do_gettimeofday(&d->buffer_time[i]); -#endif } } |