Commit bde3bfee authored by Adrian Bunk's avatar Adrian Bunk Committed by David Woodhouse

MTD: remove some kernel 2.0 and 2.2 #ifdef's

The patch below (applies against 2.6.8-rc2) removes some #ifdef's for 
kernel 2.0 and 2.2 from the MTD code.
Signed-off-by: default avatarAdrian Bunk <bunk@fs.tum.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 1bb0fa18
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* (C) 2000 Red Hat. GPL'd * (C) 2000 Red Hat. GPL'd
* *
* $Id: cfi_cmdset_0020.c,v 1.13 2004/07/12 21:52:50 dwmw2 Exp $ * $Id: cfi_cmdset_0020.c,v 1.14 2004/07/20 02:44:25 dwmw2 Exp $
* *
* 10/10/2000 Nicolas Pitre <nico@cam.org> * 10/10/2000 Nicolas Pitre <nico@cam.org>
* - completely revamped method functions so they are aware and * - completely revamped method functions so they are aware and
...@@ -1400,11 +1400,6 @@ static void cfi_staa_destroy(struct mtd_info *mtd) ...@@ -1400,11 +1400,6 @@ static void cfi_staa_destroy(struct mtd_info *mtd)
kfree(cfi); kfree(cfi);
} }
#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
#define cfi_staa_init init_module
#define cfi_staa_exit cleanup_module
#endif
static char im_name[]="cfi_cmdset_0020"; static char im_name[]="cfi_cmdset_0020";
int __init cfi_staa_init(void) int __init cfi_staa_init(void)
......
/* /*
* $Id: pmc551.c,v 1.26 2004/07/14 17:25:07 dwmw2 Exp $ * $Id: pmc551.c,v 1.27 2004/07/20 02:44:26 dwmw2 Exp $
* *
* PMC551 PCI Mezzanine Ram Device * PMC551 PCI Mezzanine Ram Device
* *
...@@ -109,12 +109,6 @@ ...@@ -109,12 +109,6 @@
#include <linux/mtd/pmc551.h> #include <linux/mtd/pmc551.h>
#include <linux/mtd/compatmac.h> #include <linux/mtd/compatmac.h>
#if LINUX_VERSION_CODE > 0x20300
#define PCI_BASE_ADDRESS(dev) (dev->resource[0].start)
#else
#define PCI_BASE_ADDRESS(dev) (dev->base_address[0])
#endif
static struct mtd_info *pmc551list; static struct mtd_info *pmc551list;
static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr) static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
...@@ -564,7 +558,7 @@ static u32 fixup_pmc551 (struct pci_dev *dev) ...@@ -564,7 +558,7 @@ static u32 fixup_pmc551 (struct pci_dev *dev)
(size<1024)?size:(size<1048576)?size>>10:size>>20, (size<1024)?size:(size<1048576)?size>>10:size>>20,
(size<1024)?'B':(size<1048576)?'K':'M', (size<1024)?'B':(size<1048576)?'K':'M',
size, ((dcmd&(0x1<<3)) == 0)?"non-":"", size, ((dcmd&(0x1<<3)) == 0)?"non-":"",
PCI_BASE_ADDRESS(dev)&PCI_BASE_ADDRESS_MEM_MASK ); (dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK );
/* /*
* Check to see the state of the memory * Check to see the state of the memory
...@@ -694,7 +688,7 @@ int __init init_pmc551(void) ...@@ -694,7 +688,7 @@ int __init init_pmc551(void)
} }
printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n", printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n",
PCI_BASE_ADDRESS(PCI_Device)); PCI_Device->resource[0].start);
/* /*
* The PMC551 device acts VERY weird if you don't init it * The PMC551 device acts VERY weird if you don't init it
...@@ -748,7 +742,7 @@ int __init init_pmc551(void) ...@@ -748,7 +742,7 @@ int __init init_pmc551(void)
printk(KERN_NOTICE "pmc551: Using specified aperture size %dM\n", asize>>20); printk(KERN_NOTICE "pmc551: Using specified aperture size %dM\n", asize>>20);
priv->asize = asize; priv->asize = asize;
} }
priv->start = ioremap((PCI_BASE_ADDRESS(PCI_Device) priv->start = ioremap(((PCI_Device->resource[0].start)
& PCI_BASE_ADDRESS_MEM_MASK), & PCI_BASE_ADDRESS_MEM_MASK),
priv->asize); priv->asize);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Derived from drivers/mtd/spia.c * Derived from drivers/mtd/spia.c
* Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
* *
* $Id: autcpu12.c,v 1.19 2004/07/12 15:02:15 dwmw2 Exp $ * $Id: autcpu12.c,v 1.20 2004/07/20 02:44:26 dwmw2 Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -44,14 +44,6 @@ ...@@ -44,14 +44,6 @@
*/ */
static struct mtd_info *autcpu12_mtd = NULL; static struct mtd_info *autcpu12_mtd = NULL;
/*
* Module stuff
*/
#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
#define autcpu12_init init_module
#define autcpu12_cleanup cleanup_module
#endif
static int autcpu12_io_base = CS89712_VIRT_BASE; static int autcpu12_io_base = CS89712_VIRT_BASE;
static int autcpu12_fio_pbase = AUTCPU12_PHYS_SMC; static int autcpu12_fio_pbase = AUTCPU12_PHYS_SMC;
static int autcpu12_fio_ctrl = AUTCPU12_SMC_SELECT_OFFSET; static int autcpu12_fio_ctrl = AUTCPU12_SMC_SELECT_OFFSET;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Derived from drivers/mtd/autcpu12.c * Derived from drivers/mtd/autcpu12.c
* Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de)
* *
* $Id: tx4925ndfmc.c,v 1.2 2004/03/27 19:55:53 gleixner Exp $ * $Id: tx4925ndfmc.c,v 1.3 2004/07/20 02:44:26 dwmw2 Exp $
* *
* Copyright (C) 2001 Toshiba Corporation * Copyright (C) 2001 Toshiba Corporation
* *
...@@ -39,14 +39,6 @@ extern struct nand_oobinfo jffs2_oobinfo; ...@@ -39,14 +39,6 @@ extern struct nand_oobinfo jffs2_oobinfo;
*/ */
static struct mtd_info *tx4925ndfmc_mtd = NULL; static struct mtd_info *tx4925ndfmc_mtd = NULL;
/*
* Module stuff
*/
#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
#define tx4925ndfmc_init init_module
#define tx4925ndfmc_cleanup cleanup_module
#endif
/* /*
* Define partitions for flash devices * Define partitions for flash devices
*/ */
......
/* Common Flash Interface structures /* Common Flash Interface structures
* See http://support.intel.com/design/flash/technote/index.htm * See http://support.intel.com/design/flash/technote/index.htm
* $Id: cfi.h,v 1.44 2004/07/13 22:32:52 dwmw2 Exp $ * $Id: cfi.h,v 1.45 2004/07/20 02:44:27 dwmw2 Exp $
*/ */
#ifndef __MTD_CFI_H__ #ifndef __MTD_CFI_H__
...@@ -328,14 +328,12 @@ static inline uint8_t cfi_read_query(struct map_info *map, uint32_t addr) ...@@ -328,14 +328,12 @@ static inline uint8_t cfi_read_query(struct map_info *map, uint32_t addr)
static inline void cfi_udelay(int us) static inline void cfi_udelay(int us)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
unsigned long t = us * HZ / 1000000; unsigned long t = us * HZ / 1000000;
if (t) { if (t) {
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(t); schedule_timeout(t);
return; return;
} }
#endif
udelay(us); udelay(us);
cond_resched(); cond_resched();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment