asm-generic: use little-endian bitops
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 23 Mar 2011 23:42:04 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:15 +0000 (19:46 -0700)
As a preparation for removing ext2 non-atomic bit operations from
asm/bitops.h.  This converts ext2 non-atomic bit operations to
little-endian bit operations.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-generic/bitops/ext2-atomic.h

index ab1c875efb74f4698003253a5e3b379f3f277aac..ecf1c9d8a7cc43e8d9adaffecac83c5b9e37ff27 100644 (file)
@@ -5,7 +5,7 @@
        ({                                              \
                int ret;                                \
                spin_lock(lock);                        \
-               ret = ext2_set_bit((nr), (unsigned long *)(addr)); \
+               ret = __test_and_set_bit_le(nr, addr);  \
                spin_unlock(lock);                      \
                ret;                                    \
        })
@@ -14,7 +14,7 @@
        ({                                              \
                int ret;                                \
                spin_lock(lock);                        \
-               ret = ext2_clear_bit((nr), (unsigned long *)(addr)); \
+               ret = __test_and_clear_bit_le(nr, addr);        \
                spin_unlock(lock);                      \
                ret;                                    \
        })