summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@netinsight.net>2009-08-24 09:09:50 +0200
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:25 -0500
commitab32ffa1fdf23b968bbdfcb956ba9c9f5d5361bd (patch)
tree101e92e9509b22b00030a8feee1daa535b527dcf /fs/ubifs
parentc0072e6cbe5ddf6dea7073fcd21587a3f3a306d8 (diff)
downloadu-boot-imx-ab32ffa1fdf23b968bbdfcb956ba9c9f5d5361bd.zip
u-boot-imx-ab32ffa1fdf23b968bbdfcb956ba9c9f5d5361bd.tar.gz
u-boot-imx-ab32ffa1fdf23b968bbdfcb956ba9c9f5d5361bd.tar.bz2
Move __set/clear_bit from ubifs.h to bitops.h
__set_bit and __clear_bit are defined in ubifs.h as well as in asm/include/bitops.h for some architectures. This patch moves the generic implementation to include/linux/bitops.h and uses that unless it's defined by the architecture. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/ubifs.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 43865aa..06772af 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -449,38 +449,6 @@ static inline ino_t parent_ino(struct dentry *dentry)
return res;
}
-/* linux/include/linux/bitops.h */
-
-#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
-#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
-
-/* linux/include/asm-generic/bitops/non-atomic.h */
-
-/**
- * __set_bit - Set a bit in memory
- * @nr: the bit to set
- * @addr: the address to start counting from
- *
- * Unlike set_bit(), this function is non-atomic and may be reordered.
- * If it's called on the same region of memory simultaneously, the effect
- * may be that only one operation succeeds.
- */
-static inline void __set_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BIT_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
-
- *p |= mask;
-}
-
-static inline void __clear_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BIT_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
-
- *p &= ~mask;
-}
-
/* debug.c */
#define DEFINE_SPINLOCK(...)