Commit 1e8abf28 authored by David Woodhouse's avatar David Woodhouse Committed by David Woodhouse

NULL noise removal, missing __iomem in a couple of declarations,

removal of bogus cast to void * in iounmap() calls.
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 6b2bdc37
......@@ -2,7 +2,7 @@
* amd76xrom.c
*
* Normal mappings of chips in physical memory
* $Id: amd76xrom.c,v 1.18 2004/11/16 18:29:02 dwmw2 Exp $
* $Id: amd76xrom.c,v 1.19 2004/11/28 09:40:39 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -89,7 +89,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
u8 byte;
struct amd76xrom_window *window = &amd76xrom_window;
struct amd76xrom_map_info *map = 0;
struct amd76xrom_map_info *map = NULL;
unsigned long map_top;
/* Remember the pci dev I find the window in */
......@@ -244,7 +244,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
map_destroy(map->mtd);
map->mtd = 0;
map->mtd = NULL;
goto out;
}
......@@ -254,7 +254,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
/* File away the map structure */
list_add(&map->list, &window->maps);
map = 0;
map = NULL;
}
out:
......
......@@ -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.16 2004/11/04 13:24:14 gleixner 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
......@@ -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;
}
}
......
/*
* $Id: ebony.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* $Id: ebony.c,v 1.14 2004/11/28 09:40:39 dwmw2 Exp $
*
* Mapping for Ebony user flash
*
......@@ -64,7 +64,7 @@ static struct mtd_partition ebony_large_partitions[] = {
int __init init_ebony(void)
{
u8 fpga0_reg;
u8 *fpga0_adr;
u8 __iomem *fpga0_adr;
unsigned long long small_flash_base, large_flash_base;
fpga0_adr = ioremap64(EBONY_FPGA_ADDR, 16);
......@@ -114,8 +114,7 @@ int __init init_ebony(void)
}
ebony_large_map.phys = large_flash_base;
ebony_large_map.virt =
(unsigned long)ioremap64(large_flash_base,
ebony_large_map.virt = ioremap64(large_flash_base,
ebony_large_map.size);
if (!ebony_large_map.virt) {
......@@ -146,13 +145,13 @@ static void __exit cleanup_ebony(void)
}
if (ebony_small_map.virt) {
iounmap((void *)ebony_small_map.virt);
ebony_small_map.virt = 0;
iounmap(ebony_small_map.virt);
ebony_small_map.virt = NULL;
}
if (ebony_large_map.virt) {
iounmap((void *)ebony_large_map.virt);
ebony_large_map.virt = 0;
iounmap(ebony_large_map.virt);
ebony_large_map.virt = NULL;
}
}
......
......@@ -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.24 2004/11/16 18:29:02 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.
......@@ -182,7 +182,7 @@ static void cleanup_elan_104nc(void)
map_destroy( all_mtd );
}
iounmap((void *)iomapadr);
iounmap(iomapadr);
}
static int __init init_elan_104nc(void)
......
......@@ -2,7 +2,7 @@
* ichxrom.c
*
* Normal mappings of chips in physical memory
* $Id: ichxrom.c,v 1.15 2004/11/16 18:29:02 dwmw2 Exp $
* $Id: ichxrom.c,v 1.16 2004/11/28 09:40:39 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -89,7 +89,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
{
static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
struct ichxrom_window *window = &ichxrom_window;
struct ichxrom_map_info *map = 0;
struct ichxrom_map_info *map = NULL;
unsigned long map_top;
u8 byte;
u16 word;
......@@ -291,7 +291,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
map_destroy(map->mtd);
map->mtd = 0;
map->mtd = NULL;
goto out;
}
......@@ -301,7 +301,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
/* File away the map structure */
list_add(&map->list, &window->maps);
map = 0;
map = NULL;
}
out:
......
/*
* $Id: l440gx.c,v 1.16 2004/11/16 18:29:02 dwmw2 Exp $
* $Id: l440gx.c,v 1.17 2004/11/28 09:40:39 dwmw2 Exp $
*
* BIOS Flash chip on Intel 440GX board.
*
......@@ -103,7 +103,7 @@ static int __init init_l440gx(void)
/* Allocate the resource region */
if (pci_assign_resource(pm_dev, PIIXE_IOBASE_RESOURCE) != 0) {
printk(KERN_WARNING "Could not allocate pm iobase resource\n");
iounmap((void *)l440gx_map.virt);
iounmap(l440gx_map.virt);
return -ENXIO;
}
}
......@@ -137,7 +137,7 @@ static int __init init_l440gx(void)
return 0;
}
iounmap((void *)l440gx_map.virt);
iounmap(l440gx_map.virt);
return -ENXIO;
}
......@@ -146,7 +146,7 @@ static void __exit cleanup_l440gx(void)
del_mtd_device(mymtd);
map_destroy(mymtd);
iounmap((void *)l440gx_map.virt);
iounmap(l440gx_map.virt);
}
module_init(init_l440gx);
......
......@@ -3,7 +3,7 @@
* Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
* based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
*
* $Id: netsc520.c,v 1.12 2004/11/04 13:24:15 gleixner Exp $
* $Id: netsc520.c,v 1.13 2004/11/28 09:40:40 dwmw2 Exp $
*
* 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
......@@ -111,7 +111,7 @@ static int __init init_netsc520(void)
mymtd = do_map_probe("map_rom", &netsc520_map);
if (!mymtd) {
iounmap((void *)netsc520_map.virt);
iounmap(netsc520_map.virt);
return -ENXIO;
}
......@@ -127,8 +127,8 @@ static void __exit cleanup_netsc520(void)
map_destroy(mymtd);
}
if (netsc520_map.virt) {
iounmap((void *)netsc520_map.virt);
netsc520_map.virt = 0;
iounmap(netsc520_map.virt);
netsc520_map.virt = NULL;
}
}
......
......@@ -6,7 +6,7 @@
* (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
*
* $Id: nettel.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
* $Id: nettel.c,v 1.9 2004/11/28 09:40:40 dwmw2 Exp $
*/
/****************************************************************************/
......@@ -471,8 +471,8 @@ void __exit nettel_cleanup(void)
map_destroy(amd_mtd);
}
if (nettel_amd_map.virt) {
iounmap((void *)nettel_amd_map.virt);
nettel_amd_map.virt = 0;
iounmap(nettel_amd_map.virt);
nettel_amd_map.virt = NULL;
}
#ifdef CONFIG_MTD_CFI_INTELEXT
if (intel_mtd) {
......
......@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* $Id: pci.c,v 1.8 2004/07/12 22:38:29 dwmw2 Exp $
* $Id: pci.c,v 1.9 2004/11/28 09:40:40 dwmw2 Exp $
*
* Generic PCI memory map driver. We support the following boards:
* - Intel IQ80310 ATU.
......@@ -33,7 +33,7 @@ struct mtd_pci_info {
struct map_pci_info {
struct map_info map;
void *base;
void __iomem *base;
void (*exit)(struct pci_dev *dev, struct map_pci_info *map);
unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
struct pci_dev *dev;
......@@ -143,7 +143,7 @@ static void
intel_iq80310_exit(struct pci_dev *dev, struct map_pci_info *map)
{
if (map->base)
iounmap((void *)map->base);
iounmap(map->base);
pci_write_config_dword(dev, 0x44, map->map.map_priv_2);
}
......@@ -236,7 +236,7 @@ intel_dc21285_exit(struct pci_dev *dev, struct map_pci_info *map)
u32 val;
if (map->base)
iounmap((void *)map->base);
iounmap(map->base);
/*
* We need to undo the PCI BAR2/PCI ROM BAR address alteration.
......
/*
* $Id: physmap.c,v 1.36 2004/11/04 13:24:15 gleixner Exp $
* $Id: physmap.c,v 1.37 2004/11/28 09:40:40 dwmw2 Exp $
*
* Normal mappings of chips in physical memory
*
......@@ -92,7 +92,7 @@ static int __init init_physmap(void)
return 0;
}
iounmap((void *)physmap_map.virt);
iounmap(physmap_map.virt);
return -ENXIO;
}
......@@ -112,8 +112,8 @@ static void __exit cleanup_physmap(void)
#endif
map_destroy(mymtd);
iounmap((void *)physmap_map.virt);
physmap_map.virt = 0;
iounmap(physmap_map.virt);
physmap_map.virt = NULL;
}
module_init(init_physmap);
......
......@@ -17,7 +17,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: sbc_gxx.c,v 1.32 2004/11/16 18:29:02 dwmw2 Exp $
$Id: sbc_gxx.c,v 1.33 2004/11/28 09:40:40 dwmw2 Exp $
The SBC-MediaGX / SBC-GXx has up to 16 MiB of
Intel StrataFlash (28F320/28F640) in x8 mode.
......@@ -189,7 +189,7 @@ static void cleanup_sbc_gxx(void)
map_destroy( all_mtd );
}
iounmap((void *)iomapadr);
iounmap(iomapadr);
release_region(PAGE_IO,PAGE_IO_SIZE);
}
......@@ -206,7 +206,7 @@ static int __init init_sbc_gxx(void)
printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n",
sbc_gxx_map.name,
PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 );
iounmap((void *)iomapadr);
iounmap(iomapadr);
return -EAGAIN;
}
......
......@@ -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: sc520cdp.c,v 1.18 2004/11/04 13:24:15 gleixner Exp $
* $Id: sc520cdp.c,v 1.19 2004/11/28 09:40:40 dwmw2 Exp $
*
*
* The SC520CDP is an evaluation board for the Elan SC520 processor available
......@@ -186,12 +186,12 @@ static struct sc520_par_table par_table[NUM_FLASH_BANKS] =
static void sc520cdp_setup_par(void)
{
volatile unsigned long *mmcr;
volatile unsigned long __iomem *mmcr;
unsigned long mmcr_val;
int i, j;
/* map in SC520's MMCR area */
mmcr = (unsigned long *)ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
mmcr = ioremap_nocache(SC520_MMCR_BASE, SC520_MMCR_EXTENT);
if(!mmcr) { /* ioremap_nocache failed: skip the PAR reprogramming */
/* force physical address fields to BIOS defaults: */
for(i = 0; i < NUM_FLASH_BANKS; i++)
......@@ -223,7 +223,7 @@ static void sc520cdp_setup_par(void)
sc520cdp_map[i].phys = par_table[i].default_address;
}
}
iounmap((void *)mmcr);
iounmap(mmcr);
}
#endif
......@@ -261,7 +261,7 @@ static int __init init_sc520cdp(void)
++devices_found;
}
else {
iounmap((void *)sc520cdp_map[i].virt);
iounmap(sc520cdp_map[i].virt);
}
}
if(devices_found >= 2) {
......@@ -290,8 +290,8 @@ static void __exit cleanup_sc520cdp(void)
if (mymtd[i])
map_destroy(mymtd[i]);
if (sc520cdp_map[i].virt) {
iounmap((void *)sc520cdp_map[i].virt);
sc520cdp_map[i].virt = 0;
iounmap(sc520cdp_map[i].virt);
sc520cdp_map[i].virt = NULL;
}
}
}
......
/*
* MTD map driver for BIOS Flash on Intel SCB2 boards
* $Id: scb2_flash.c,v 1.10 2004/11/16 18:29:02 dwmw2 Exp $
* $Id: scb2_flash.c,v 1.11 2004/11/28 09:40:40 dwmw2 Exp $
* Copyright (C) 2002 Sun Microsystems, Inc.
* Tim Hockin <thockin@sun.com>
*
......@@ -62,7 +62,7 @@
#define SCB2_WINDOW 0x00100000
static void *scb2_ioaddr;
static void __iomem *scb2_ioaddr;
static struct mtd_info *scb2_mtd;
static struct map_info scb2_map = {
.name = "SCB2 BIOS Flash",
......@@ -163,7 +163,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
}
scb2_map.phys = SCB2_ADDR;
scb2_map.virt = (void __iomem *)scb2_ioaddr;
scb2_map.virt = scb2_ioaddr;
scb2_map.size = SCB2_WINDOW;
simple_map_init(&scb2_map);
......
......@@ -2,7 +2,7 @@
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
$Id: scx200_docflash.c,v 1.9 2004/11/16 18:29:02 dwmw2 Exp $
$Id: scx200_docflash.c,v 1.10 2004/11/28 09:40:40 dwmw2 Exp $
National Semiconductor SCx200 flash mapped with DOCCS
*/
......@@ -190,7 +190,7 @@ static int __init init_scx200_docflash(void)
mymtd = do_map_probe(flashtype, &scx200_docflash_map);
if (!mymtd) {
printk(KERN_ERR NAME ": unable to detect flash\n");
iounmap((void *)scx200_docflash_map.virt);
iounmap(scx200_docflash_map.virt);
release_resource(&docmem);
return -ENXIO;
}
......@@ -221,7 +221,7 @@ static void __exit cleanup_scx200_docflash(void)
map_destroy(mymtd);
}
if (scx200_docflash_map.virt) {
iounmap((void *)scx200_docflash_map.virt);
iounmap(scx200_docflash_map.virt);
release_resource(&docmem);
}
}
......
......@@ -25,7 +25,7 @@
* - If you have created your own jffs file system and the bios overwrites
* it during boot, try disabling Drive A: and B: in the boot order.
*
* $Id: ts5500_flash.c,v 1.1 2004/09/20 15:33:26 sean Exp $
* $Id: ts5500_flash.c,v 1.2 2004/11/28 09:40:40 dwmw2 Exp $
*/
#include <linux/config.h>
......@@ -79,7 +79,7 @@ static int __init init_ts5500_map(void)
{
int rc = 0;
ts5500_map.virt = (void*)ioremap_nocache(ts5500_map.phys, ts5500_map.size);
ts5500_map.virt = ioremap_nocache(ts5500_map.phys, ts5500_map.size);
if(!ts5500_map.virt) {
printk(KERN_ERR "Failed to ioremap_nocache\n");
......@@ -110,7 +110,7 @@ static int __init init_ts5500_map(void)
err_out_map:
map_destroy(mymtd);
err_out_ioremap:
iounmap((void *)ts5500_map.virt);
iounmap(ts5500_map.virt);
return rc;
}
......@@ -127,8 +127,8 @@ static void __exit cleanup_ts5500_map(void)
}
if (ts5500_map.virt) {
iounmap((void *)ts5500_map.virt);
ts5500_map.virt = 0;
iounmap(ts5500_map.virt);
ts5500_map.virt = NULL;
}
}
......
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