]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Cleanups for physmap_of.c (v2)
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 20 Sep 2007 01:22:25 +0000 (11:22 +1000)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Thu, 20 Sep 2007 12:37:16 +0000 (07:37 -0500)
commitc4d5e375470862fd741f93bf0686d7ac2f7fdce4
tree8a82ce5fadde3c8a752f1080b427ef3c4c45e3d7
parentbd0076cc330f303905018a17d9dcfbabde497572
[POWERPC] Cleanups for physmap_of.c (v2)

This patch includes a whole batch of smallish cleanups for
drivers/mtd/physmap_of.c.

- A bunch of uneeded #includes are removed
- We switch to the modern linux/of.h etc. in place of
asm/prom.h
- Use some helper macros to avoid some ugly inline #ifdefs
- A few lines of unreachable code are removed
- A number of indentation / line-wrapping fixes
- More consistent use of kernel idioms such as if (!p) instead
of if (p == NULL)
- Clarify some printk()s and other informative strings.
- parse_obsolete_partitions() now returns 0 if no partition
information is found, instead of returning -ENOENT which the caller
had to handle specially.
- (the big one) Despite the name, this driver really has
nothing to do with drivers/mtd/physmap.c.  The fact that the flash
chips must be physically direct mapped is a constrant, but doesn't
really say anything about the actual purpose of this driver, which is
to instantiate MTD devices based on information from the device tree.
Therefore the physmap name is replaced everywhere within the file with
"of_flash".  The file itself and the Kconfig option is not renamed for
now (so that the diff is actually a diff).  That can come later.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
drivers/mtd/maps/physmap_of.c