mtd: clean up usage of MTD_DOCPROBE_ADDRESS

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:38 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6be55f79a216ccb9f364476b12e5b151a5f6bdb6
Commit:     6be55f79a216ccb9f364476b12e5b151a5f6bdb6
Parent:     123005f3ccfa58637ad6e1a8b9f7f3f861ca65f4
Author:     Paul Bolle <pebolle at tiscali.nl>
AuthorDate: Tue Oct 25 11:00:07 2011 +0200
Committer:  Artem Bityutskiy <Artem.Bityutskiy at intel.com>
CommitDate: Sun Oct 30 14:22:36 2011 +0200

    mtd: clean up usage of MTD_DOCPROBE_ADDRESS
    
    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 at tiscali.nl>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 drivers/mtd/devices/Kconfig    |    3 +--
 drivers/mtd/devices/docprobe.c |    5 -----
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 6d91a1f..283d887 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -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.
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index d374603..45116bb 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -50,11 +50,6 @@
 #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);



More information about the linux-mtd-cvs mailing list