aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2011-10-25 05:00:07 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>2011-10-30 08:22:36 -0400
commit6be55f79a216ccb9f364476b12e5b151a5f6bdb6 (patch)
tree76925f4ea346af2b2817e5226341aaeae0e8f9d5 /drivers/mtd
parent123005f3ccfa58637ad6e1a8b9f7f3f861ca65f4 (diff)
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@tiscali.nl> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/Kconfig3
-rw-r--r--drivers/mtd/devices/docprobe.c5
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 6d91a1f049c8..283d887f7825 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -278,8 +278,7 @@ config MTD_DOCPROBE_ADVANCED
278config MTD_DOCPROBE_ADDRESS 278config MTD_DOCPROBE_ADDRESS
279 hex "Physical address of DiskOnChip" if MTD_DOCPROBE_ADVANCED 279 hex "Physical address of DiskOnChip" if MTD_DOCPROBE_ADVANCED
280 depends on MTD_DOCPROBE 280 depends on MTD_DOCPROBE
281 default "0x0000" if MTD_DOCPROBE_ADVANCED 281 default "0x0"
282 default "0" if !MTD_DOCPROBE_ADVANCED
283 ---help--- 282 ---help---
284 By default, the probe for DiskOnChip devices will look for a 283 By default, the probe for DiskOnChip devices will look for a
285 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000. 284 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 d374603493a7..45116bb30297 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -50,11 +50,6 @@
50#include <linux/mtd/nand.h> 50#include <linux/mtd/nand.h>
51#include <linux/mtd/doc2000.h> 51#include <linux/mtd/doc2000.h>
52 52
53/* Where to look for the devices? */
54#ifndef CONFIG_MTD_DOCPROBE_ADDRESS
55#define CONFIG_MTD_DOCPROBE_ADDRESS 0
56#endif
57
58 53
59static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS; 54static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;
60module_param(doc_config_location, ulong, 0); 55module_param(doc_config_location, ulong, 0);