* [PATCH] mtd: clean up usage of MTD_DOCPROBE_ADDRESS
@ 2011-10-25 9:00 Paul Bolle
2011-10-25 15:04 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Paul Bolle @ 2011-10-25 9:00 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd, linux-kernel
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>
---
Tested only by running "make menuconfig" with different values and by
looking at the preprocessor's output (ie, running "make -C /[...] M=$PWD
EXTRA_CFLAGS=-E docprobe.ko").
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 35081ce..4fdc2fe 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -268,8 +268,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);
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: clean up usage of MTD_DOCPROBE_ADDRESS
2011-10-25 9:00 [PATCH] mtd: clean up usage of MTD_DOCPROBE_ADDRESS Paul Bolle
@ 2011-10-25 15:04 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-10-25 15:04 UTC (permalink / raw)
To: Paul Bolle; +Cc: linux-mtd, David Woodhouse, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
On Tue, 2011-10-25 at 11:00 +0200, Paul Bolle wrote:
> 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>
Pushed to l2-mtd-2.6.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-25 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 9:00 [PATCH] mtd: clean up usage of MTD_DOCPROBE_ADDRESS Paul Bolle
2011-10-25 15:04 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox