X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fdilnetpc.c;h=0bc79c93a58491c9cea700c786b5ff64fa0d5a85;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=feb38ba14f26966e2b9a58b4a2d713631c38b037;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index feb38ba14..0bc79c93a 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c @@ -14,7 +14,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: dilnetpc.c,v 1.13 2004/07/12 21:59:44 dwmw2 Exp $ + * $Id: dilnetpc.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $ * * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems * featuring the AMD Elan SC410 processor. There are two variants of this @@ -197,7 +197,7 @@ static void dnpc_unmap_flash(void) ************************************************************ */ -static spinlock_t dnpc_spin = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(dnpc_spin); static int vpp_counter = 0; /* ** This is what has to be done for the DNP board .. @@ -403,7 +403,7 @@ static int __init init_dnpc(void) printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys); - dnpc_map.virt = (unsigned long)ioremap_nocache(dnpc_map.phys, dnpc_map.size); + dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size); dnpc_map_flash(dnpc_map.phys, dnpc_map.size); @@ -413,7 +413,7 @@ static int __init init_dnpc(void) } simple_map_init(&dnpc_map); - printk("FLASH virtual address: 0x%lx\n", dnpc_map.virt); + printk("FLASH virtual address: 0x%p\n", dnpc_map.virt); mymtd = do_map_probe("jedec_probe", &dnpc_map); @@ -430,7 +430,7 @@ static int __init init_dnpc(void) mymtd->erasesize = 0x10000; if (!mymtd) { - iounmap((void *)dnpc_map.virt); + iounmap(dnpc_map.virt); return -ENXIO; } @@ -481,9 +481,9 @@ static void __exit cleanup_dnpc(void) map_destroy(mymtd); } if (dnpc_map.virt) { - iounmap((void *)dnpc_map.virt); + iounmap(dnpc_map.virt); dnpc_unmap_flash(); - dnpc_map.virt = 0; + dnpc_map.virt = NULL; } }