Commit e613797c authored by David Woodhouse's avatar David Woodhouse

MTD: some cleanups

The patch below makes the following cleanups for code under drivers/mtd/ :
- make some needlessly global code static
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 0bc2b3ae
......@@ -13,7 +13,7 @@
*
* This code is GPL
*
* $Id: cfi_cmdset_0002.c,v 1.110 2004/09/24 04:26:04 eric Exp $
* $Id: cfi_cmdset_0002.c,v 1.111 2004/11/16 18:29:00 dwmw2 Exp $
*
*/
......@@ -1506,7 +1506,7 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd)
static char im_name[]="cfi_cmdset_0002";
int __init cfi_amdstd_init(void)
static int __init cfi_amdstd_init(void)
{
inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0002);
return 0;
......
......@@ -4,7 +4,7 @@
*
* (C) 2000 Red Hat. GPL'd
*
* $Id: cfi_cmdset_0020.c,v 1.15 2004/08/09 13:19:43 dwmw2 Exp $
* $Id: cfi_cmdset_0020.c,v 1.16 2004/11/16 18:29:00 dwmw2 Exp $
*
* 10/10/2000 Nicolas Pitre <nico@cam.org>
* - completely revamped method functions so they are aware and
......@@ -1401,7 +1401,7 @@ static void cfi_staa_destroy(struct mtd_info *mtd)
static char im_name[]="cfi_cmdset_0020";
int __init cfi_staa_init(void)
static int __init cfi_staa_init(void)
{
inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020);
return 0;
......
/*
* $Id: chipreg.c,v 1.16 2003/05/29 09:36:15 dwmw2 Exp $
* $Id: chipreg.c,v 1.17 2004/11/16 18:29:00 dwmw2 Exp $
*
* Registration for chip drivers
*
......@@ -15,7 +15,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.h>
spinlock_t chip_drvs_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t chip_drvs_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(chip_drvs_list);
void register_mtd_chip_driver(struct mtd_chip_driver *drv)
......
/*
Common Flash Interface probe code.
(C) 2000 Red Hat. GPL'd.
$Id: jedec_probe.c,v 1.57 2004/09/17 11:45:05 eric Exp $
$Id: jedec_probe.c,v 1.58 2004/11/16 18:29:00 dwmw2 Exp $
See JEDEC (http://www.jedec.org/) standard JESD21C (section 3.5)
for the standard this probe goes back to.
......@@ -1661,7 +1661,7 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index);
static int jedec_probe_chip(struct map_info *map, __u32 base,
unsigned long *chip_map, struct cfi_private *cfi);
struct mtd_info *jedec_probe(struct map_info *map);
static struct mtd_info *jedec_probe(struct map_info *map);
static inline u32 jedec_read_mfr(struct map_info *map, __u32 base,
struct cfi_private *cfi)
......@@ -2055,7 +2055,7 @@ static struct chip_probe jedec_chip_probe = {
.probe_chip = jedec_probe_chip
};
struct mtd_info *jedec_probe(struct map_info *map)
static struct mtd_info *jedec_probe(struct map_info *map)
{
/*
* Just use the generic probe stuff to call our CFI-specific
......@@ -2070,7 +2070,7 @@ static struct mtd_chip_driver jedec_chipdrv = {
.module = THIS_MODULE
};
int __init jedec_probe_init(void)
static int __init jedec_probe_init(void)
{
register_mtd_chip_driver(&jedec_chipdrv);
return 0;
......
/*
* Common code to handle absent "placeholder" devices
* Copyright 2001 Resilience Corporation <ebrower@resilience.com>
* $Id: map_absent.c,v 1.4 2003/05/28 12:51:49 dwmw2 Exp $
* $Id: map_absent.c,v 1.5 2004/11/16 18:29:00 dwmw2 Exp $
*
* This map driver is used to allocate "placeholder" MTD
* devices on systems that have socketed/removable media.
......@@ -98,7 +98,7 @@ static void map_absent_destroy(struct mtd_info *mtd)
/* nop */
}
int __init map_absent_init(void)
static int __init map_absent_init(void)
{
register_mtd_chip_driver(&map_absent_chipdrv);
return 0;
......
/*
* Common code to handle map devices which are simple RAM
* (C) 2000 Red Hat. GPL'd.
* $Id: map_ram.c,v 1.20 2004/08/09 13:19:43 dwmw2 Exp $
* $Id: map_ram.c,v 1.21 2004/11/16 18:29:00 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -124,7 +124,7 @@ static void mapram_nop(struct mtd_info *mtd)
/* Nothing to see here */
}
int __init map_ram_init(void)
static int __init map_ram_init(void)
{
register_mtd_chip_driver(&mapram_chipdrv);
return 0;
......
/*
* Common code to handle map devices which are simple ROM
* (C) 2000 Red Hat. GPL'd.
* $Id: map_rom.c,v 1.21 2004/07/12 14:06:01 dwmw2 Exp $
* $Id: map_rom.c,v 1.22 2004/11/16 18:29:00 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -19,7 +19,7 @@
static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
static void maprom_nop (struct mtd_info *);
struct mtd_info *map_rom_probe(struct map_info *map);
static struct mtd_info *map_rom_probe(struct map_info *map);
static struct mtd_chip_driver maprom_chipdrv = {
.probe = map_rom_probe,
......@@ -27,7 +27,7 @@ static struct mtd_chip_driver maprom_chipdrv = {
.module = THIS_MODULE
};
struct mtd_info *map_rom_probe(struct map_info *map)
static struct mtd_info *map_rom_probe(struct map_info *map)
{
struct mtd_info *mtd;
......@@ -75,7 +75,7 @@ static int maprom_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *re
return -EIO;
}
int __init map_rom_init(void)
static int __init map_rom_init(void)
{
register_mtd_chip_driver(&maprom_chipdrv);
return 0;
......
/*
* $Id: cmdlinepart.c,v 1.15 2004/09/21 12:11:41 lavinen Exp $
* $Id: cmdlinepart.c,v 1.16 2004/11/16 18:28:59 dwmw2 Exp $
*
* Read flash partition table from command line
*
......@@ -339,7 +339,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
* main.c::checksetup(). Note that we can not yet kmalloc() anything,
* so we only save the commandline for later processing.
*/
int mtdpart_setup(char *s)
static int mtdpart_setup(char *s)
{
cmdline = s;
return 1;
......
/*
* $Id: blkmtd.c,v 1.23 2004/08/09 14:03:19 dwmw2 Exp $
* $Id: blkmtd.c,v 1.24 2004/11/16 18:29:01 dwmw2 Exp $
*
* blkmtd.c - use a block device as a fake MTD
*
......@@ -39,7 +39,7 @@
/* Default erase size in K, always make it a multiple of PAGE_SIZE */
#define CONFIG_MTD_BLKDEV_ERASESIZE (128 << 10) /* 128KiB */
#define VERSION "$Revision: 1.23 $"
#define VERSION "$Revision: 1.24 $"
/* Info for the block device */
struct blkmtd_dev {
......@@ -59,10 +59,10 @@ static void blkmtd_sync(struct mtd_info *mtd);
#define MAX_DEVICES 4
/* Module parameters passed by insmod/modprobe */
char *device[MAX_DEVICES]; /* the block device to use */
int erasesz[MAX_DEVICES]; /* optional default erase size */
int ro[MAX_DEVICES]; /* optional read only flag */
int sync;
static char *device[MAX_DEVICES]; /* the block device to use */
static int erasesz[MAX_DEVICES]; /* optional default erase size */
static int ro[MAX_DEVICES]; /* optional read only flag */
static int sync;
MODULE_LICENSE("GPL");
......
......@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
*
* $Id: doc2000.c,v 1.63 2004/09/16 23:51:56 gleixner Exp $
* $Id: doc2000.c,v 1.64 2004/11/16 18:29:01 dwmw2 Exp $
*/
#include <linux/kernel.h>
......@@ -1276,7 +1276,7 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
*
****************************************************************************/
int __init init_doc2000(void)
static int __init init_doc2000(void)
{
inter_module_register(im_name, THIS_MODULE, &DoC2k_init);
return 0;
......
......@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
*
* $Id: doc2001.c,v 1.45 2004/09/16 23:51:57 gleixner Exp $
* $Id: doc2001.c,v 1.46 2004/11/16 18:29:01 dwmw2 Exp $
*/
#include <linux/kernel.h>
......@@ -856,7 +856,7 @@ int doc_erase (struct mtd_info *mtd, struct erase_info *instr)
*
****************************************************************************/
int __init init_doc2001(void)
static int __init init_doc2001(void)
{
inter_module_register(im_name, THIS_MODULE, &DoCMil_init);
return 0;
......
......@@ -6,7 +6,7 @@
* (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
*
* $Id: doc2001plus.c,v 1.10 2004/09/16 23:51:57 gleixner Exp $
* $Id: doc2001plus.c,v 1.11 2004/11/16 18:29:01 dwmw2 Exp $
*
* Released under GPL
*/
......@@ -1122,7 +1122,7 @@ int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
*
****************************************************************************/
int __init init_doc2001plus(void)
static int __init init_doc2001plus(void)
{
inter_module_register(im_name, THIS_MODULE, &DoCMilPlus_init);
return 0;
......
......@@ -4,7 +4,7 @@
/* (C) 1999 Machine Vision Holdings, Inc. */
/* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */
/* $Id: docprobe.c,v 1.42 2004/09/16 23:51:57 gleixner Exp $ */
/* $Id: docprobe.c,v 1.43 2004/11/16 18:29:01 dwmw2 Exp $ */
......@@ -328,7 +328,7 @@ static void __init DoC_Probe(unsigned long physadr)
*
****************************************************************************/
int __init init_doc(void)
static int __init init_doc(void)
{
int i;
......
/*
* mtdram - a test mtd device
* $Id: mtdram.c,v 1.33 2004/08/09 13:19:44 dwmw2 Exp $
* $Id: mtdram.c,v 1.34 2004/11/16 18:29:01 dwmw2 Exp $
* Author: Alexander Larsson <alex@cendio.se>
*
* Copyright (c) 1999 Alexander Larsson <alex@cendio.se>
......@@ -153,7 +153,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
#if CONFIG_MTDRAM_TOTAL_SIZE > 0
#if CONFIG_MTDRAM_ABS_POS > 0
int __init init_mtdram(void)
static int __init init_mtdram(void)
{
void *addr;
int err;
......@@ -186,7 +186,7 @@ int __init init_mtdram(void)
#else /* CONFIG_MTDRAM_ABS_POS > 0 */
int __init init_mtdram(void)
static int __init init_mtdram(void)
{
void *addr;
int err;
......@@ -220,7 +220,7 @@ int __init init_mtdram(void)
#else /* CONFIG_MTDRAM_TOTAL_SIZE > 0 */
int __init init_mtdram(void)
static int __init init_mtdram(void)
{
return 0;
}
......
/**
*
* $Id: phram.c,v 1.2 2004/08/09 13:19:44 dwmw2 Exp $
* $Id: phram.c,v 1.3 2004/11/16 18:29:01 dwmw2 Exp $
*
* Copyright (c) Jochen Schaeuble <psionic@psionic.de>
* 07/2003 rewritten by Joern Engel <joern@wh.fh-wedel.de>
......@@ -39,7 +39,7 @@ static LIST_HEAD(phram_list);
int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
{
u_char *start = (u_char *)mtd->priv;
......@@ -60,7 +60,7 @@ int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
return 0;
}
int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char **mtdbuf)
{
u_char *start = (u_char *)mtd->priv;
......@@ -73,11 +73,11 @@ int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
return 0;
}
void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
{
}
int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
static int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf)
{
u_char *start = (u_char *)mtd->priv;
......@@ -91,7 +91,7 @@ int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
return 0;
}
int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
static int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
u_char *start = (u_char *)mtd->priv;
......@@ -340,7 +340,7 @@ module_param_call(slram, slram_setup, NULL, NULL, 000);
MODULE_PARM_DESC(slram, "List of memory regions to map. \"map=<name>,<start><length/end>\"");
int __init init_phram(void)
static int __init init_phram(void)
{
printk(KERN_ERR "phram loaded\n");
return 0;
......
/*
* $Id: pmc551.c,v 1.28 2004/08/09 13:19:44 dwmw2 Exp $
* $Id: pmc551.c,v 1.29 2004/11/16 18:29:01 dwmw2 Exp $
*
* PMC551 PCI Mezzanine Ram Device
*
......@@ -648,7 +648,7 @@ static int asize=0;
/*
* PMC551 Card Initialization
*/
int __init init_pmc551(void)
static int __init init_pmc551(void)
{
struct pci_dev *PCI_Device = NULL;
struct mypriv *priv;
......
/*======================================================================
$Id: slram.c,v 1.31 2004/08/09 13:19:44 dwmw2 Exp $
$Id: slram.c,v 1.32 2004/11/16 18:29:01 dwmw2 Exp $
This driver provides a method to access memory not used by the kernel
itself (i.e. if the kernel commandline mem=xxx is used). To actually
......@@ -75,13 +75,13 @@ MODULE_PARM_DESC(map, "List of memory regions to map. \"map=<name>, <start>, <le
static slram_mtd_list_t *slram_mtdlist = NULL;
int slram_erase(struct mtd_info *, struct erase_info *);
int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **);
void slram_unpoint(struct mtd_info *, u_char *, loff_t, size_t);
int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
static int slram_erase(struct mtd_info *, struct erase_info *);
static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **);
static void slram_unpoint(struct mtd_info *, u_char *, loff_t, size_t);
static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
static int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
{
slram_priv_t *priv = mtd->priv;
......@@ -103,7 +103,7 @@ int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
return(0);
}
int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
static int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char **mtdbuf)
{
slram_priv_t *priv = (slram_priv_t *)mtd->priv;
......@@ -113,11 +113,11 @@ int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
return(0);
}
void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
{
}
int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
static int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf)
{
slram_priv_t *priv = (slram_priv_t *)mtd->priv;
......@@ -128,7 +128,7 @@ int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
return(0);
}
int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
static int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
slram_priv_t *priv = (slram_priv_t *)mtd->priv;
......@@ -141,7 +141,7 @@ int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
/*====================================================================*/
int register_device(char *name, unsigned long start, unsigned long length)
static int register_device(char *name, unsigned long start, unsigned long length)
{
slram_mtd_list_t **curmtd;
......@@ -213,7 +213,7 @@ int register_device(char *name, unsigned long start, unsigned long length)
return(0);
}
void unregister_devices(void)
static void unregister_devices(void)
{
slram_mtd_list_t *nextitem;
......@@ -228,7 +228,7 @@ void unregister_devices(void)
}
}
unsigned long handle_unit(unsigned long value, char *unit)
static unsigned long handle_unit(unsigned long value, char *unit)
{
if ((*unit == 'M') || (*unit == 'm')) {
return(value * 1024 * 1024);
......@@ -238,7 +238,7 @@ unsigned long handle_unit(unsigned long value, char *unit)
return(value);
}
int parse_cmdline(char *devname, char *szstart, char *szlength)
static int parse_cmdline(char *devname, char *szstart, char *szlength)
{
char *buffer;
unsigned long devstart;
......@@ -285,7 +285,7 @@ __setup("slram=", mtd_slram_setup);
#endif
int init_slram(void)
static int init_slram(void)
{
char *devname;
int i;
......
......@@ -7,7 +7,7 @@
* (c) 1999 Machine Vision Holdings, Inc.
* Author: David Woodhouse <dwmw2@infradead.org>
*
* $Id: inftlcore.c,v 1.17 2004/08/09 13:56:48 dwmw2 Exp $
* $Id: inftlcore.c,v 1.18 2004/11/16 18:28:59 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
......@@ -352,7 +352,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
return targetEUN;
}
u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock)
static u16 INFTL_makefreeblock(struct INFTLrecord *inftl, unsigned pendingblock)
{
/*
* This is the part that needs some cleverness applied.
......@@ -877,7 +877,7 @@ static int inftl_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo)
return 0;
}
struct mtd_blktrans_ops inftl_tr = {
static struct mtd_blktrans_ops inftl_tr = {
.name = "inftl",
.major = INFTL_MAJOR,
.part_bits = INFTL_PARTN_BITS,
......@@ -891,9 +891,9 @@ struct mtd_blktrans_ops inftl_tr = {
extern char inftlmountrev[];
int __init init_inftl(void)
static int __init init_inftl(void)
{
printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.17 $, "
printk(KERN_INFO "INFTL: inftlcore.c $Revision: 1.18 $, "
"inftlmount.c %s\n", inftlmountrev);
return register_mtd_blktrans(&inftl_tr);
......
......@@ -2,7 +2,7 @@
* amd76xrom.c
*
* Normal mappings of chips in physical memory
* $Id: amd76xrom.c,v 1.17 2004/09/18 01:59:56 eric Exp $
* $Id: amd76xrom.c,v 1.18 2004/11/16 18:29:02 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -298,7 +298,7 @@ static struct pci_driver amd76xrom_driver = {
};
#endif
int __init init_amd76xrom(void)
static int __init init_amd76xrom(void)
{
struct pci_dev *pdev;
struct pci_device_id *id;
......
......@@ -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.23 2004/11/04 13:24:14 gleixner Exp $
$Id: elan-104nc.c,v 1.24 2004/11/16 18:29:02 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.
......@@ -185,7 +185,7 @@ static void cleanup_elan_104nc(void)
iounmap((void *)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. */
......
......@@ -2,7 +2,7 @@
* ichxrom.c
*
* Normal mappings of chips in physical memory
* $Id: ichxrom.c,v 1.14 2004/09/18 01:59:56 eric Exp $
* $Id: ichxrom.c,v 1.15 2004/11/16 18:29:02 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -349,7 +349,7 @@ static struct pci_driver ichxrom_driver = {
};
#endif
int __init init_ichxrom(void)
static int __init init_ichxrom(void)
{
struct pci_dev *pdev;
struct pci_device_id *id;
......
/*
* $Id: l440gx.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $
* $Id: l440gx.c,v 1.16 2004/11/16 18:29:02 dwmw2 Exp $
*
* BIOS Flash chip on Intel 440GX board.
*
......@@ -30,7 +30,7 @@ static struct mtd_info *mymtd;
/* Is this really the vpp port? */
void l440gx_set_vpp(struct map_info *map, int vpp)
static void l440gx_set_vpp(struct map_info *map, int vpp)
{
unsigned long l;
......@@ -43,7 +43,7 @@ void l440gx_set_vpp(struct map_info *map, int vpp)
outl(l, VPP_PORT);
}
struct map_info l440gx_map = {
static struct map_info l440gx_map = {
.name = "L440GX BIOS",
.size = WINDOW_SIZE,
.bankwidth = BUSWIDTH,
......
......@@ -5,7 +5,7 @@
*
* This code is GPL
*
* $Id: pnc2000.c,v 1.16 2004/09/16 23:27:13 gleixner Exp $
* $Id: pnc2000.c,v 1.17 2004/11/16 18:29:02 dwmw2 Exp $
*/
#include <linux/module.h>
......@@ -26,7 +26,7 @@
*/
struct map_info pnc_map = {
static struct map_info pnc_map = {
.name = "PNC-2000",
.size = WINDOW_SIZE,
.bankwidth = 4,
......@@ -62,7 +62,7 @@ static struct mtd_partition pnc_partitions[3] = {
*/
static struct mtd_info *mymtd;
int __init init_pnc2000(void)
static int __init init_pnc2000(void)
{
printk(KERN_NOTICE "Photron PNC-2000 flash mapping: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR);
......
......@@ -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.31 2004/11/04 13:24:15 gleixner Exp $
$Id: sbc_gxx.c,v 1.32 2004/11/16 18:29:02 dwmw2 Exp $
The SBC-MediaGX / SBC-GXx has up to 16 MiB of
Intel StrataFlash (28F320/28F640) in x8 mode.
......@@ -193,7 +193,7 @@ static void cleanup_sbc_gxx(void)
release_region(PAGE_IO,PAGE_IO_SIZE);
}
int __init init_sbc_gxx(void)
static int __init init_sbc_gxx(void)
{
iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) {
......
/*
* MTD map driver for BIOS Flash on Intel SCB2 boards
* $Id: scb2_flash.c,v 1.9 2004/09/16 23:27:14 gleixner Exp $
* $Id: scb2_flash.c,v 1.10 2004/11/16 18:29:02 dwmw2 Exp $
* Copyright (C) 2002 Sun Microsystems, Inc.
* Tim Hockin <thockin@sun.com>
*
......@@ -64,7 +64,7 @@
static void *scb2_ioaddr;
static struct mtd_info *scb2_mtd;
struct map_info scb2_map = {
static struct map_info scb2_map = {
.name = "SCB2 BIOS Flash",
.size = 0,
.bankwidth = 1,
......
......@@ -2,7 +2,7 @@
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
$Id: scx200_docflash.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
$Id: scx200_docflash.c,v 1.9 2004/11/16 18:29:02 dwmw2 Exp $
National Semiconductor SCx200 flash mapped with DOCCS
*/
......@@ -81,7 +81,7 @@ static struct map_info scx200_docflash_map = {
.name = "NatSemi SCx200 DOCCS Flash",
};
int __init init_scx200_docflash(void)
static int __init init_scx200_docflash(void)
{
unsigned u;
unsigned base;
......
/*
* $Id: mtd_blkdevs.c,v 1.23 2004/08/19 01:54:36 tpoynor Exp $
* $Id: mtd_blkdevs.c,v 1.24 2004/11/16 18:28:59 dwmw2 Exp $
*
* (C) 2003 David Woodhouse <dwmw2@infradead.org>
*
......@@ -143,7 +143,7 @@ static void mtd_blktrans_request(struct request_queue *rq)
}
int blktrans_open(struct inode *i, struct file *f)
static int blktrans_open(struct inode *i, struct file *f)
{
struct mtd_blktrans_dev *dev;
struct mtd_blktrans_ops *tr;
......@@ -174,7 +174,7 @@ int blktrans_open(struct inode *i, struct file *f)
return ret;
}
int blktrans_release(struct inode *i, struct file *f)
static int blktrans_release(struct inode *i, struct file *f)
{
struct mtd_blktrans_dev *dev;
struct mtd_blktrans_ops *tr;
......@@ -326,7 +326,7 @@ int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old)
return 0;
}
void blktrans_notify_remove(struct mtd_info *mtd)
static void blktrans_notify_remove(struct mtd_info *mtd)
{
struct list_head *this, *this2, *next;
......@@ -342,7 +342,7 @@ void blktrans_notify_remove(struct mtd_info *mtd)
}
}
void blktrans_notify_add(struct mtd_info *mtd)
static void blktrans_notify_add(struct mtd_info *mtd)
{
struct list_head *this;
......
/*
* Direct MTD block device access
*
* $Id: mtdblock.c,v 1.64 2003/10/04 17:14:14 dwmw2 Exp $
* $Id: mtdblock.c,v 1.65 2004/11/16 18:28:59 dwmw2 Exp $
*
* (C) 2000-2003 Nicolas Pitre <nico@cam.org>
* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
......@@ -361,7 +361,7 @@ static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
kfree(dev);
}
struct mtd_blktrans_ops mtdblock_tr = {
static struct mtd_blktrans_ops mtdblock_tr = {
.name = "mtdblock",
.major = 31,
.part_bits = 0,
......@@ -375,7 +375,7 @@ struct mtd_blktrans_ops mtdblock_tr = {
.owner = THIS_MODULE,
};
int __init init_mtdblock(void)
static int __init init_mtdblock(void)
{
return register_mtd_blktrans(&mtdblock_tr);
}
......
/*
* drivers/mtd/mtdblock.h
*
* common defines for mtdblock-core and mtdblock-2x
*
* $Id: mtdblock.h,v 1.1 2002/11/27 10:33:37 gleixner Exp $
*
*/
#ifndef __MTD_MTDBLOCK_H__
#define __MTD_MTDBLOCK_H__
#define MAJOR_NR MTD_BLOCK_MAJOR
#define DEVICE_NAME "mtdblock"
struct mtdblk_dev {
struct mtd_info *mtd; /* Locked */
int count;
struct semaphore cache_sem;
unsigned char *cache_data;
unsigned long cache_offset;
unsigned int cache_size;
enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state;
};
extern int write_cached_data (struct mtdblk_dev *mtdblk);
extern int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos,
int len, const char *buf);
extern int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos,
int len, char *buf);
extern void __exit cleanup_mtdblock(void);
extern int __init init_mtdblock(void);
#endif
/*
* $Id: mtdblock_ro.c,v 1.18 2003/06/23 12:00:08 dwmw2 Exp $
* $Id: mtdblock_ro.c,v 1.19 2004/11/16 18:28:59 dwmw2 Exp $
*
* (C) 2003 David Woodhouse <dwmw2@infradead.org>
*
......@@ -58,7 +58,7 @@ static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
kfree(dev);
}
struct mtd_blktrans_ops mtdblock_tr = {
static struct mtd_blktrans_ops mtdblock_tr = {
.name = "mtdblock",
.major = 31,
.part_bits = 0,
......
/*
* $Id: mtdcore.c,v 1.43 2004/07/23 15:20:46 dwmw2 Exp $
* $Id: mtdcore.c,v 1.44 2004/11/16 18:28:59 dwmw2 Exp $
*
* Core registration and callback routines for MTD
* drivers and users.
......@@ -382,7 +382,7 @@ static int mtd_read_proc (char *page, char **start, off_t off, int count,
/*====================================================================*/
/* Init code */
int __init init_mtd(void)
static int __init init_mtd(void)
{
#ifdef CONFIG_PROC_FS
if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
......
......@@ -5,7 +5,7 @@
*
* This code is GPL
*
* $Id: mtdpart.c,v 1.50 2004/08/10 16:18:34 dwmw2 Exp $
* $Id: mtdpart.c,v 1.51 2004/11/16 18:28:59 dwmw2 Exp $
*
* 02-21-2002 Thomas Gleixner <gleixner@autronix.de>
* added support for read_oob, write_oob
......@@ -526,7 +526,7 @@ EXPORT_SYMBOL(del_mtd_partitions);
static spinlock_t part_parser_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(part_parsers);
struct mtd_part_parser *get_partition_parser(const char *name)
static struct mtd_part_parser *get_partition_parser(const char *name)
{
struct list_head *this;
void *ret = NULL;
......
......@@ -16,7 +16,7 @@
*
* Interface to generic NAND code for M-Systems DiskOnChip devices
*
* $Id: diskonchip.c,v 1.41 2004/11/05 16:07:16 kalev Exp $
* $Id: diskonchip.c,v 1.42 2004/11/16 18:29:03 dwmw2 Exp $
*/
#include <linux/kernel.h>
......@@ -1720,7 +1720,7 @@ static void release_nanddoc(void)
}
}
int __init init_nanddoc(void)
static int __init init_nanddoc(void)
{
int i, ret = 0;
......@@ -1762,7 +1762,7 @@ int __init init_nanddoc(void)
return ret;
}
void __exit cleanup_nanddoc(void)
static void __exit cleanup_nanddoc(void)
{
/* Cleanup the nand/DoC resources */
release_nanddoc();
......
/* Linux driver for NAND Flash Translation Layer */
/* (c) 1999 Machine Vision Holdings, Inc. */
/* Author: David Woodhouse <dwmw2@infradead.org> */
/* $Id: nftlcore.c,v 1.96 2004/06/28 13:52:55 dbrown Exp $ */
/* $Id: nftlcore.c,v 1.97 2004/11/16 18:28:59 dwmw2 Exp $ */
/*
The contents of this file are distributed under the GNU General
......@@ -421,7 +421,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p
return targetEUN;
}
u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
{
/* This is the part that needs some cleverness applied.
For now, I'm doing the minimum applicable to actually
......@@ -731,7 +731,7 @@ static int nftl_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo)
****************************************************************************/
struct mtd_blktrans_ops nftl_tr = {
static struct mtd_blktrans_ops nftl_tr = {
.name = "nftl",
.major = NFTL_MAJOR,
.part_bits = NFTL_PARTN_BITS,
......@@ -747,9 +747,9 @@ struct mtd_blktrans_ops nftl_tr = {
extern char nftlmountrev[];
int __init init_nftl(void)
static int __init init_nftl(void)
{
printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.96 $, nftlmount.c %s\n", nftlmountrev);
printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.97 $, nftlmount.c %s\n", nftlmountrev);
return register_mtd_blktrans(&nftl_tr);
}
......
......@@ -5,7 +5,7 @@
*
* This code is GPL
*
* $Id: partitions.h,v 1.15 2003/07/09 11:15:43 dwmw2 Exp $
* $Id: partitions.h,v 1.16 2004/11/16 18:34:40 dwmw2 Exp $
*/
#ifndef MTD_PARTITIONS_H
......@@ -64,7 +64,6 @@ struct mtd_part_parser {
int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long);
};
extern struct mtd_part_parser *get_partition_parser(const char *name);
extern int register_mtd_parser(struct mtd_part_parser *parser);
extern int deregister_mtd_parser(struct mtd_part_parser *parser);
extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
......
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