summaryrefslogtreecommitdiffstats
path: root/include/nand.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-04-08 11:32:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-04-12 09:54:56 +0200
commitf880d7bc875bc4165a9de8ad81ecf1ccb8307af7 (patch)
tree9592cc3cbda3d22fb4818ff6a7fb77e75e3dff13 /include/nand.h
parente7c06800ee4c8d780b7a701346def7b08414fc63 (diff)
downloadbarebox-f880d7bc875bc4165a9de8ad81ecf1ccb8307af7.tar.gz
barebox-f880d7bc875bc4165a9de8ad81ecf1ccb8307af7.tar.xz
nand bb: add proper bb remove function
The old way happily removed cdev entries which were no bb dev at all. Fix this by checking if the given device actually is a bb device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/nand.h')
-rw-r--r--include/nand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/nand.h b/include/nand.h
index 05358d0218..b1762dfa45 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -6,10 +6,15 @@ struct nand_bb;
#ifdef CONFIG_NAND
int dev_add_bb_dev(char *filename, const char *name);
+int dev_remove_bb_dev(const char *name);
#else
static inline int dev_add_bb_dev(char *filename, const char *name) {
return 0;
}
+static inline int dev_remove_bb_dev(const char *name)
+{
+ return 0;
+}
#endif
#endif /* __NAND_H__ */