Skip to content

Commit

Permalink
[MTD] core: Clean up trailing white spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Thomas Gleixner committed Nov 7, 2005
1 parent b95f960 commit 97894cd
Show file tree
Hide file tree
Showing 16 changed files with 399 additions and 399 deletions.
32 changes: 16 additions & 16 deletions drivers/mtd/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Kconfig,v 1.10 2005/07/11 10:39:27 gleixner Exp $
# $Id: Kconfig,v 1.11 2005/11/07 11:14:19 gleixner Exp $

menu "Memory Technology Devices (MTD)"

Expand All @@ -10,7 +10,7 @@ config MTD
will provide the generic support for MTD drivers to register
themselves with the kernel and for potential users of MTD devices
to enumerate the devices which are present and obtain a handle on
them. It will also allow you to select individual drivers for
them. It will also allow you to select individual drivers for
particular hardware and users of MTD devices. If unsure, say N.

config MTD_DEBUG
Expand Down Expand Up @@ -61,11 +61,11 @@ config MTD_REDBOOT_PARTS

If you need code which can detect and parse this table, and register
MTD 'partitions' corresponding to each image in the table, enable
this option.
this option.

You will still need the parsing functions to be called by the driver
for your particular device. It won't happen automatically. The
SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
for your particular device. It won't happen automatically. The
SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
example.

config MTD_REDBOOT_DIRECTORY_BLOCK
Expand All @@ -81,10 +81,10 @@ config MTD_REDBOOT_DIRECTORY_BLOCK
partition table. A zero or positive value gives an absolete
erase block number. A negative value specifies a number of
sectors before the end of the device.

For example "2" means block number 2, "-1" means the last
block and "-2" means the penultimate block.

config MTD_REDBOOT_PARTS_UNALLOCATED
bool " Include unallocated flash regions"
depends on MTD_REDBOOT_PARTS
Expand All @@ -105,11 +105,11 @@ config MTD_CMDLINE_PARTS
---help---
Allow generic configuration of the MTD paritition tables via the kernel
command line. Multiple flash resources are supported for hardware where
different kinds of flash memory are available.
different kinds of flash memory are available.

You will still need the parsing functions to be called by the driver
for your particular device. It won't happen automatically. The
SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
for your particular device. It won't happen automatically. The
SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
example.

The format for the command line is as follows:
Expand All @@ -118,12 +118,12 @@ config MTD_CMDLINE_PARTS
<mtddef> := <mtd-id>:<partdef>[,<partdef>]
<partdef> := <size>[@offset][<name>][ro]
<mtd-id> := unique id used in mapping driver/device
<size> := standard linux memsize OR "-" to denote all
<size> := standard linux memsize OR "-" to denote all
remaining space
<name> := (NAME)

Due to the way Linux handles the command line, no spaces are
allowed in the partition definition, including mtd id's and partition
Due to the way Linux handles the command line, no spaces are
allowed in the partition definition, including mtd id's and partition
names.

Examples:
Expand Down Expand Up @@ -240,7 +240,7 @@ config INFTL
tristate "INFTL (Inverse NAND Flash Translation Layer) support"
depends on MTD
---help---
This provides support for the Inverse NAND Flash Translation
This provides support for the Inverse NAND Flash Translation
Layer which is used on M-Systems' newer DiskOnChip devices. It
uses a kind of pseudo-file system on a flash device to emulate
a block device with 512-byte sectors, on top of which you put
Expand All @@ -257,8 +257,8 @@ config RFD_FTL
tristate "Resident Flash Disk (Flash Translation Layer) support"
depends on MTD
---help---
This provides support for the flash translation layer known
as the Resident Flash Disk (RFD), as used by the Embedded BIOS
This provides support for the flash translation layer known
as the Resident Flash Disk (RFD), as used by the Embedded BIOS
of General Software. There is a blurb at:

http://www.gensw.com/pages/prod/bios/rfd.htm
Expand Down
16 changes: 8 additions & 8 deletions drivers/mtd/afs.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/*======================================================================
drivers/mtd/afs.c: ARM Flash Layout/Partitioning
Copyright (C) 2000 ARM Limited
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
This is access code for flashes using ARM's flash partitioning
This is access code for flashes using ARM's flash partitioning
standards.
$Id: afs.c,v 1.13 2004/02/27 22:09:59 rmk Exp $
$Id: afs.c,v 1.15 2005/11/07 11:14:19 gleixner Exp $
======================================================================*/

Expand Down Expand Up @@ -163,7 +163,7 @@ afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr)
return ret;
}

static int parse_afs_partitions(struct mtd_info *mtd,
static int parse_afs_partitions(struct mtd_info *mtd,
struct mtd_partition **pparts,
unsigned long origin)
{
Expand Down
56 changes: 28 additions & 28 deletions drivers/mtd/cmdlinepart.c
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*
* $Id: cmdlinepart.c,v 1.18 2005/06/07 15:04:26 joern Exp $
* $Id: cmdlinepart.c,v 1.19 2005/11/07 11:14:19 gleixner Exp $
*
* Read flash partition table from command line
*
* Copyright 2002 SYSGO Real-Time Solutions GmbH
*
* The format for the command line is as follows:
*
*
* mtdparts=<mtddef>[;<mtddef]
* <mtddef> := <mtd-id>:<partdef>[,<partdef>]
* <partdef> := <size>[@offset][<name>][ro]
* <mtd-id> := unique name used in mapping driver/device (mtd->name)
* <size> := standard linux memsize OR "-" to denote all remaining space
* <name> := '(' NAME ')'
*
*
* Examples:
*
*
* 1 NOR Flash, with 1 single writable partition:
* edb7312-nor:-
*
*
* 1 NOR Flash with 2 partitions, 1 NAND with one
* edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
*/
Expand Down Expand Up @@ -60,17 +60,17 @@ static int cmdline_parsed = 0;

/*
* Parse one partition definition for an MTD. Since there can be many
* comma separated partition definitions, this function calls itself
* comma separated partition definitions, this function calls itself
* recursively until no more partition definitions are found. Nice side
* effect: the memory to keep the mtd_partition structs and the names
* is allocated upon the last definition being found. At that point the
* syntax has been verified ok.
*/
static struct mtd_partition * newpart(char *s,
static struct mtd_partition * newpart(char *s,
char **retptr,
int *num_parts,
int this_part,
unsigned char **extra_mem_ptr,
int this_part,
unsigned char **extra_mem_ptr,
int extra_mem_size)
{
struct mtd_partition *parts;
Expand Down Expand Up @@ -102,7 +102,7 @@ static struct mtd_partition * newpart(char *s,
mask_flags = 0; /* this is going to be a regular partition */
delim = 0;
/* check for offset */
if (*s == '@')
if (*s == '@')
{
s++;
offset = memparse(s, &s);
Expand All @@ -112,7 +112,7 @@ static struct mtd_partition * newpart(char *s,
{
delim = ')';
}

if (delim)
{
char *p;
Expand All @@ -131,12 +131,12 @@ static struct mtd_partition * newpart(char *s,
name = NULL;
name_len = 13; /* Partition_000 */
}

/* record name length for memory allocation later */
extra_mem_size += name_len + 1;

/* test for options */
if (strncmp(s, "ro", 2) == 0)
if (strncmp(s, "ro", 2) == 0)
{
mask_flags |= MTD_WRITEABLE;
s += 2;
Expand All @@ -151,7 +151,7 @@ static struct mtd_partition * newpart(char *s,
return NULL;
}
/* more partitions follow, parse them */
if ((parts = newpart(s + 1, &s, num_parts,
if ((parts = newpart(s + 1, &s, num_parts,
this_part + 1, &extra_mem, extra_mem_size)) == 0)
return NULL;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ static struct mtd_partition * newpart(char *s,
extra_mem += name_len + 1;

dbg(("partition %d: name <%s>, offset %x, size %x, mask flags %x\n",
this_part,
this_part,
parts[this_part].name,
parts[this_part].offset,
parts[this_part].size,
Expand All @@ -204,8 +204,8 @@ static struct mtd_partition * newpart(char *s,
return parts;
}

/*
* Parse the command line.
/*
* Parse the command line.
*/
static int mtdpart_setup_real(char *s)
{
Expand All @@ -230,7 +230,7 @@ static int mtdpart_setup_real(char *s)

dbg(("parsing <%s>\n", p+1));

/*
/*
* parse one mtd. have it reserve memory for the
* struct cmdline_mtd_partition and the mtd-id string.
*/
Expand All @@ -239,7 +239,7 @@ static int mtdpart_setup_real(char *s)
&num_parts, /* out: number of parts */
0, /* first partition */
(unsigned char**)&this_mtd, /* out: extra mem */
mtd_id_len + 1 + sizeof(*this_mtd) +
mtd_id_len + 1 + sizeof(*this_mtd) +
sizeof(void*)-1 /*alignment*/);
if(!parts)
{
Expand All @@ -254,21 +254,21 @@ static int mtdpart_setup_real(char *s)
}

/* align this_mtd */
this_mtd = (struct cmdline_mtd_partition *)
this_mtd = (struct cmdline_mtd_partition *)
ALIGN((unsigned long)this_mtd, sizeof(void*));
/* enter results */
/* enter results */
this_mtd->parts = parts;
this_mtd->num_parts = num_parts;
this_mtd->mtd_id = (char*)(this_mtd + 1);
strlcpy(this_mtd->mtd_id, mtd_id, mtd_id_len + 1);

/* link into chain */
this_mtd->next = partitions;
this_mtd->next = partitions;
partitions = this_mtd;

dbg(("mtdid=<%s> num_parts=<%d>\n",
dbg(("mtdid=<%s> num_parts=<%d>\n",
this_mtd->mtd_id, this_mtd->num_parts));


/* EOS - we're done */
if (*s == 0)
Expand All @@ -292,7 +292,7 @@ static int mtdpart_setup_real(char *s)
* information. It returns partitions for the requested mtd device, or
* the first one in the chain if a NULL mtd_id is passed in.
*/
static int parse_cmdline_partitions(struct mtd_info *master,
static int parse_cmdline_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
unsigned long origin)
{
Expand Down Expand Up @@ -322,7 +322,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
part->parts[i].size = master->size - offset;
if (offset + part->parts[i].size > master->size)
{
printk(KERN_WARNING ERRP
printk(KERN_WARNING ERRP
"%s: partitioning exceeds flash size, truncating\n",
part->mtd_id);
part->parts[i].size = master->size - offset;
Expand All @@ -338,8 +338,8 @@ static int parse_cmdline_partitions(struct mtd_info *master,
}


/*
* This is the handler for our kernel parameter, called from
/*
* This is the handler for our kernel parameter, called from
* main.c::checksetup(). Note that we can not yet kmalloc() anything,
* so we only save the commandline for later processing.
*
Expand Down
Loading

0 comments on commit 97894cd

Please sign in to comment.