mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: dwmw2@redhat.com
Cc: mtd@infradead.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] MTD: remove some kernel 2.0 and 2.2 #ifdef's
Date: Sun, 18 Jul 2004 14:00:48 +0200	[thread overview]
Message-ID: <20040718120048.GW14733@fs.tum.de> (raw)

The patch below (applies against 2.6.8-rc2) removes some #ifdef's for 
kernel 2.0 and 2.2 from the MTD code.

diffstat output:
 drivers/mtd/chips/cfi_cmdset_0020.c |    5 -----
 drivers/mtd/nand/tx4925ndfmc.c      |    8 --------
 drivers/mtd/devices/pmc551.c        |   12 +++---------
 drivers/mtd/nand/autcpu12.c         |    8 --------
 include/linux/mtd/cfi.h             |    2 --
 5 files changed, 3 insertions(+), 32 deletions(-)


Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.8-rc2-full/drivers/mtd/chips/cfi_cmdset_0020.c.old	2004-07-18 13:49:31.000000000 +0200
+++ linux-2.6.8-rc2-full/drivers/mtd/chips/cfi_cmdset_0020.c	2004-07-18 13:49:45.000000000 +0200
@@ -1400,11 +1400,6 @@
 	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";
 
 int __init cfi_staa_init(void)
--- mtd/drivers/mtd/devices/pmc551.c	24 Jan 2003 13:34:30 -0000	1.22
+++ mtd/drivers/mtd/devices/pmc551.c	12 Mar 2003 08:57:58 -0000
@@ -108,12 +108,6 @@
 #include <linux/mtd/pmc551.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 int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
@@ -563,7 +557,7 @@
 	       (size<1024)?size:(size<1048576)?size>>10:size>>20,
                (size<1024)?'B':(size<1048576)?'K':'M',
 	       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
@@ -698,7 +692,7 @@
                 }
 
                 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
@@ -752,7 +746,7 @@
 			printk(KERN_NOTICE "pmc551: Using specified aperture size %dM\n", asize>>20);
 			priv->asize = asize;
 		}
-                priv->start = ioremap((PCI_BASE_ADDRESS(PCI_Device)
+                priv->start = ioremap(((PCI_Device->resource[0].start)
                                        & PCI_BASE_ADDRESS_MEM_MASK),
                                       priv->asize);
 		
--- mtd/drivers/mtd/nand/autcpu12.c	20 Feb 2003 13:39:38 -0000	1.9
+++ mtd/drivers/mtd/nand/autcpu12.c	12 Mar 2003 08:58:00 -0000
@@ -42,14 +42,6 @@
  */
 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_fio_pbase = AUTCPU12_PHYS_SMC;
 static int autcpu12_fio_ctrl = AUTCPU12_SMC_SELECT_OFFSET;
--- linux-2.6.8-rc2-full/drivers/mtd/nand/tx4925ndfmc.c.old	2004-07-18 13:53:28.000000000 +0200
+++ linux-2.6.8-rc2-full/drivers/mtd/nand/tx4925ndfmc.c	2004-07-18 13:53:41.000000000 +0200
@@ -40,14 +40,6 @@
 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
  */
 
--- mtd/include/linux/mtd/cfi.h	5 Sep 2002 05:15:32 -0000	1.32
+++ mtd/include/linux/mtd/cfi.h	12 Mar 2003 08:58:13 -0000
@@ -457,14 +457,12 @@
 
 static inline void cfi_udelay(int us)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
 	unsigned long t = us * HZ / 1000000;
 	if (t) {
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(t);
 		return;
 	}
-#endif
 	udelay(us);
 	cond_resched();
 }


                 reply	other threads:[~2004-07-18 12:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040718120048.GW14733@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=dwmw2@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtd@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®