diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-08 11:32:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-12 09:54:56 +0200 |
commit | f880d7bc875bc4165a9de8ad81ecf1ccb8307af7 (patch) | |
tree | 9592cc3cbda3d22fb4818ff6a7fb77e75e3dff13 /include/nand.h | |
parent | e7c06800ee4c8d780b7a701346def7b08414fc63 (diff) | |
download | barebox-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.h | 5 |
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__ */ |