remove code for 2.0 kernels from drivers/char/ftape/*
Subsystems (2)
PATCH 1/1 remove code for 2.0 kernels from drivers/char/ftape/*
The patch below is large but trivial:
It removes #if'd compatiblity code for 2.0 kernels from drivers/char/ftape/* (this includes the removal of two header files including only compatibility code and the #include's of these files).
I've tested the compilation with 2.5.54.
Please apply
Adrian
drivers/char/ftape/lowlevel/ftape-setup.c renamed from drivers/char/ftape/lowlevel/ftape-setup.c.old +0 -5
@@ -31,12 +31,7 @@#include <linux/mm.h> #include <linux/ftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,16 )#include <linux/init.h> -#else -#define __initdata -#define __initfunc (__arg) __arg -#endif #include "../lowlevel/ftape-tracing.h" #include "../lowlevel/fdc-io.h"
drivers/char/ftape/lowlevel/ftape_syms.h deleted +0 -39
@@ -1,39 +0,0 @@ -#ifndef _FTAPE_SYMS_H -#define _FTAPE_SYMS_H - -/* -* Copyright (C) 1996-1997 Claus-Justus Heine - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -* -* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape_syms.h,v $ -* $Revision: 1.2 $ -* $Date: 1997/10/05 19:18:32 $ -* -* This file contains the definitions needed to export symbols -* from the QIC-40/80/3010/3020 floppy-tape driver "ftape" for -* Linux. -*/ - -#if LINUX_VERSION_CODE <KERNEL_VER (2 ,1 ,18 ) -#include <linux/module.h> -/* ftape-vfs.c defined global vars. -*/ - -extern struct symbol_table ftape_symbol_table; -#endif - -#endif
drivers/char/ftape/lowlevel/fdc-io.c renamed from drivers/char/ftape/lowlevel/fdc-io.c.old +0 -18
@@ -196,11 +196,7 @@fdc_usec_wait (FT_RQM_DELAY );/* wait for valid RQM status */ save_flags (flags);cli (); -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,30 )if (!in_interrupt ()) -#else - if (!intr_count) -#endif /* Yes, I know, too much comments inside this function * ... *
@@ -264,19 +260,11 @@ } }#endif -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,30 )if (!in_interrupt ()) {/* shouldn't be cleared if called from isr */ ft_interrupt_seen =0 ; } -#else -if (!intr_count) { -/* shouldn't be cleared if called from isr -*/ - ft_interrupt_seen =0 ; - } -#endif while (count) { result =fdc_write (*cmd_data);if (result <0 ) {
@@ -392,15 +380,9 @@TRACE_FUN (ft_t_fdc_dma); -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,0 ,16 )if (waitqueue_active (&ftape_wait_intr)) {TRACE_ABORT (-EIO , ft_t_err,"error: nested call" ); } -#else -if (ftape_wait_intr) { -TRACE_ABORT (-EIO , ft_t_err,"error: nested call" ); - } -#endif /* timeout time will be up to USPT microseconds too long ! */ timeout = (1000 * time +FT_USPT -1 ) /FT_USPT ;
drivers/char/ftape/lowlevel/fdc-isr.c renamed from drivers/char/ftape/lowlevel/fdc-isr.c.old +0 -15
@@ -1119,11 +1119,7 @@ } ft_seek_completed =1 ; fdc_mode = fdc_idle; -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,0 ,16 ) }else if (!waitqueue_active (&ftape_wait_intr)) { -#else - }else if (!ftape_wait_intr) { -#endif if (ft_expected_stray_interrupts ==0 ) {TRACE (ft_t_warn,"unexpected stray interrupt" ); }else {
@@ -1154,23 +1150,12 @@*/ if (!ft_hide_interrupt) { ft_interrupt_seen ++; -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,0 ,16 )if (waitqueue_active (&ftape_wait_intr)) {wake_up_interruptible (&ftape_wait_intr); } -#else -if (ftape_wait_intr) { -wake_up_interruptible (&ftape_wait_intr); - } -#endif }else { -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,0 ,16 )TRACE (ft_t_flow,"hiding interrupt while %s" ,waitqueue_active (&ftape_wait_intr) ?"waiting" :"active" ); -#else -TRACE (ft_t_flow,"hiding interrupt while %s" , - ftape_wait_intr ?"waiting" :"active" ); -#endif }#ifdef TESTING t0 =ftape_timediff (t0,ftape_timestamp ());
drivers/char/ftape/lowlevel/ftape-init.c renamed from drivers/char/ftape/lowlevel/ftape-init.c.old +0 -11
@@ -31,19 +31,13 @@#include <linux/major.h> #include <linux/ftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,16 )#include <linux/init.h> -#else -#define __initdata -#define __initfunc (__arg) __arg -#endif #include <linux/qic117.h> #ifdef CONFIG_ZFTAPE #include <linux/zftape.h> #endif #include "../lowlevel/ftape-init.h" -#include "../lowlevel/ftape_syms.h" #include "../lowlevel/ftape-io.h" #include "../lowlevel/ftape-read.h" #include "../lowlevel/ftape-write.h"
@@ -114,9 +108,6 @@ ft_failure =1 ;/* inhibit any operation but open */ ftape_udelay_calibrate ();/* must be before fdc_wait_calibrate ! */ fdc_wait_calibrate (); -#if LINUX_VERSION_CODE <KERNEL_VER (2 ,1 ,18 ) -register_symtab (&ftape_symbol_table);/* add global ftape symbols */ -#endif #if defined(CONFIG_PROC_FS ) && defined(CONFIG_FT_PROC_FS ) (void )ftape_proc_init ();#endif
@@ -132,7 +123,6 @@static int ft_tracing =-1 ;#endif -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,18 )#define FT_MOD_PARM (var,type,desc) \ MODULE_PARM(var,type); MODULE_PARM_DESC(var,desc)
@@ -154,7 +144,6 @@MODULE_DESCRIPTION ("QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives." );MODULE_LICENSE ("GPL" ); -#endif /* Called by modules package when installing the driver */
drivers/char/ftape/lowlevel/ftape-ctl.c renamed from drivers/char/ftape/lowlevel/ftape-ctl.c.old +0 -4
@@ -33,11 +33,7 @@#include <linux/ftape.h> #include <linux/qic117.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,6 )#include <asm/uaccess.h> -#else -#include <asm/segment.h> -#endif #include <asm/io.h> /* ease porting between pre-2.4.x and later kernels */
drivers/char/ftape/zftape/zftape-buffers.c renamed from drivers/char/ftape/zftape/zftape-buffers.c.old +0 -2
@@ -30,9 +30,7 @@#include <linux/zftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,0 )#include <linux/vmalloc.h> -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h"
drivers/char/ftape/zftape/zftape-ctl.c renamed from drivers/char/ftape/zftape/zftape-ctl.c.old +0 -29
@@ -33,11 +33,7 @@#include <linux/zftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,6 )#include <asm/uaccess.h> -#else -#include <asm/segment.h> -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h"
@@ -957,18 +953,11 @@*/ TRACE_EXIT 0; } -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_to_user (mtftseg->mt_data, zft_deblock_buf, mtftseg->mt_result) !=0 ) {TRACE_EXIT -EFAULT ; } -#else -TRACE_CATCH (verify_area (VERIFY_WRITE , mtftseg->mt_data, - mtftseg->mt_result),); -memcpy_tofs (mtftseg->mt_data, zft_deblock_buf, - mtftseg->mt_result); -#endif TRACE_EXIT 0; }#endif
@@ -1016,19 +1005,11 @@TRACE_EXIT -ENXIO ; }if (mtftseg->mt_mode !=FT_WR_DELETE ) { -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_from_user (zft_deblock_buf, mtftseg->mt_data,FT_SEGMENT_SIZE ) !=0 ) {TRACE_EXIT -EFAULT ; } -#else -TRACE_CATCH (verify_area (VERIFY_READ , - mtftseg->mt_data, - FT_SEGMENT_SIZE),); -memcpy_fromfs (zft_deblock_buf, mtftseg->mt_data, -FT_SEGMENT_SIZE ); -#endif } mtftseg->mt_result = ftape_write_segment(mtftseg->mt_segno, zft_deblock_buf,
@@ -1375,14 +1356,9 @@ ft_t_info, "bad argument size: %d", arg_size); }if (dir & _IOC_WRITE) { -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_from_user (&krnl_arg, arg, arg_size) !=0 ) {TRACE_EXIT -EFAULT ; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, arg, arg_size),); -memcpy_fromfs (&krnl_arg, arg, arg_size); -#endif }TRACE (ft_t_flow,"called with ioctl command: 0x%08x" , command);switch (command) {
@@ -1435,14 +1411,9 @@break ; }if ((result >=0 ) && (dir & _IOC_READ)) { -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_to_user (arg, &krnl_arg, arg_size) !=0 ) {TRACE_EXIT -EFAULT ; } -#else - TRACE_CATCH(verify_area(VERIFY_WRITE, arg, arg_size),); -memcpy_tofs (arg, &krnl_arg, arg_size); -#endif }TRACE_EXIT result; }
drivers/char/ftape/zftape/zftape-write.c renamed from drivers/char/ftape/zftape/zftape-write.c.old +0 -9
@@ -29,11 +29,7 @@#include <linux/zftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,6 )#include <asm/uaccess.h> -#else -#include <asm/segment.h> -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h"
@@ -321,14 +317,9 @@*/ space_left = seg_sz - pos->seg_byte_pos; *cnt = req_len < space_left ? req_len : space_left; -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_from_user (dst_buf + pos->seg_byte_pos, src_buf, *cnt) !=0 ) {TRACE_EXIT -EFAULT ; } -#else - TRACE_CATCH(verify_area(VERIFY_READ, src_buf, *cnt),); -memcpy_fromfs (dst_buf + pos->seg_byte_pos, src_buf, *cnt); -#endif TRACE_EXIT *cnt; }
drivers/char/ftape/zftape/zftape_syms.h deleted +0 -39
@@ -1,39 +0,0 @@ -#ifndef _ZFTAPE_SYMS_H -#define _ZFTAPE_SYMS_H - -/* -* Copyright (C) 1996, 1997 Claus-Justus Heine - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -* -* $Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape_syms.h,v $ -* $Revision: 1.2 $ -* $Date: 1997/10/05 19:19:14 $ -* -* This file contains the definitions needed for the symbols -* ftape exports -* -*/ - -#if LINUX_VERSION_CODE <KERNEL_VER (2 ,1 ,18 ) -#include <linux/module.h> -/* ftape-vfs.c defined global vars. -*/ - -extern struct symbol_table zft_symbol_table; -#endif - -#endif
drivers/char/ftape/zftape/zftape-init.c renamed from drivers/char/ftape/zftape/zftape-init.c.old +0 -1
@@ -45,7 +45,6 @@#include "../zftape/zftape-write.h" #include "../zftape/zftape-ctl.h" #include "../zftape/zftape-buffers.h" -#include "../zftape/zftape_syms.h" char zft_src[]__initdata ="$Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-init.c,v $" ;char zft_rev[]__initdata ="$Revision: 1.8 $" ;
drivers/char/ftape/zftape/zftape-read.c renamed from drivers/char/ftape/zftape/zftape-read.c.old +0 -9
@@ -29,11 +29,7 @@#include <linux/zftape.h> -#if LINUX_VERSION_CODE >=KERNEL_VER (2 ,1 ,6 )#include <asm/uaccess.h> -#else -#include <asm/segment.h> -#endif #include "../zftape/zftape-init.h" #include "../zftape/zftape-eof.h"
@@ -172,15 +168,10 @@ }else { *read_cnt = to_do; } -#if LINUX_VERSION_CODE >KERNEL_VER (2 ,1 ,3 )if (copy_to_user (dst_buf, src_buf + pos->seg_byte_pos, *read_cnt) !=0 ) {TRACE_EXIT -EFAULT ; } -#else - TRACE_CATCH(verify_area(VERIFY_WRITE, dst_buf, *read_cnt),); -memcpy_tofs (dst_buf, src_buf + pos->seg_byte_pos, *read_cnt); -#endif TRACE (ft_t_noise,"nr bytes just read: %d" , *read_cnt);TRACE_EXIT *read_cnt; }
drivers/char/ftape/compressor/zftape-compress.c renamed from drivers/char/ftape/compressor/zftape-compress.c.old +0 -49
130 lines not on this page · raw message