X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Felan-104nc.c;h=e9465f5c069e630da54aa260f848efb659925a3d;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9410e1fb28d54029c3f8f41fa3a8381bb44f4fa2;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/mtd/maps/elan-104nc.c b/drivers/mtd/maps/elan-104nc.c index 9410e1fb2..e9465f5c0 100644 --- a/drivers/mtd/maps/elan-104nc.c +++ b/drivers/mtd/maps/elan-104nc.c @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - $Id: elan-104nc.c,v 1.21 2004/07/12 22:38:29 dwmw2 Exp $ + $Id: elan-104nc.c,v 1.25 2004/11/28 09:40:39 dwmw2 Exp $ The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16 mode. This drivers uses the CFI probe and Intel Extended Command Set drivers. @@ -53,8 +53,8 @@ always fail. So we don't do it. I just hope it doesn't break anything. #define PAGE_IO_SIZE 2 static volatile int page_in_window = -1; // Current page in window. -static unsigned long iomapadr; -static spinlock_t elan_104nc_spin = SPIN_LOCK_UNLOCKED; +static void __iomem *iomapadr; +static DEFINE_SPINLOCK(elan_104nc_spin); /* partition_info gives details on the logical partitions that the split the * single flash device into. If the size if zero we use up to the end of the @@ -182,15 +182,15 @@ static void cleanup_elan_104nc(void) map_destroy( all_mtd ); } - iounmap((void *)iomapadr); + iounmap(iomapadr); } -int __init init_elan_104nc(void) +static int __init init_elan_104nc(void) { /* Urg! We use I/O port 0x22 without request_region()ing it, because it's already allocated to the PIC. */ - iomapadr = (unsigned long)ioremap(WINDOW_START, WINDOW_LENGTH); + iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH); if (!iomapadr) { printk( KERN_ERR"%s: failed to ioremap memory region\n", elan_104nc_map.name );