]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: clean up usage of MTD_DOCPROBE_ADDRESS
authorPaul Bolle <pebolle@tiscali.nl>
Tue, 25 Oct 2011 09:00:07 +0000 (11:00 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>
Sun, 30 Oct 2011 12:22:36 +0000 (14:22 +0200)
Depending on whether MTD_DOCPROBE_ADVANCED is set or not,
MTD_DOCPROBE_ADDRESS will default to either 0x0000 or 0. That should
lead to (basically) identical code in docprobe.c. The current two
defaults should be merged.

And, while we're at it, if MTD_DOCPROBE is set MTD_DOCPROBE_ADDRESS will
always be set. (MTD_DOCPROBE_ADDRESS depends on MTD_DOCPROBE and it has
a default value.) So the check whether CONFIG_MTD_DOCPROBE_ADDRESS is
defined is unnecessary and should be dropped.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/devices/Kconfig
drivers/mtd/devices/docprobe.c

index 6d91a1f049c8d63177e6b11f51da4f7917cdd840..283d887f78251168f40255fe80b788f6fba0b0fc 100644 (file)
@@ -278,8 +278,7 @@ config MTD_DOCPROBE_ADVANCED
 config MTD_DOCPROBE_ADDRESS
        hex "Physical address of DiskOnChip" if MTD_DOCPROBE_ADVANCED
        depends on MTD_DOCPROBE
-       default "0x0000" if MTD_DOCPROBE_ADVANCED
-       default "0" if !MTD_DOCPROBE_ADVANCED
+       default "0x0"
        ---help---
          By default, the probe for DiskOnChip devices will look for a
          DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
index d374603493a7da77c6f0004643809e0ac5862374..45116bb302972ba5cbde40719778aa4cb065635e 100644 (file)
 #include <linux/mtd/nand.h>
 #include <linux/mtd/doc2000.h>
 
-/* Where to look for the devices? */
-#ifndef CONFIG_MTD_DOCPROBE_ADDRESS
-#define CONFIG_MTD_DOCPROBE_ADDRESS 0
-#endif
-
 
 static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;
 module_param(doc_config_location, ulong, 0);