#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ #include #include static inline void set_bit(int nr, unsigned long *addr) { addr[nr / __BITS_PER_LONG] |= 1UL << (nr % __BITS_PER_LONG); } static inline void clear_bit(int nr, unsigned long *addr) { addr[nr / __BITS_PER_LONG] &= ~(1UL << (nr % __BITS_PER_LONG)); } static __always_inline int test_bit(unsigned int nr, const unsigned long *addr) { return ((1UL << (nr % __BITS_PER_LONG)) & (((unsigned long *)addr)[nr / __BITS_PER_LONG])) != 0; } #endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_ */ tory'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-23 13:36:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-23 13:36:37 -0800
commit6302118226830c8f0aa0ec6afc8ef0cad84faa5f (patch)
tree19bae6c5242e63ace081324b1d602922792132f7 /include/drm
parent3258943ddb90157a5b220656712394bd91bd47f1 (diff)
parent739e6f5945d88dcee01590913f6886132a10c215 (diff)
Merge tag 'gpio-v4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fix from Linus Walleij: "A single lockdep fix, nothing else going on. This makes lockdep noiseless and work properly with threaded GPIO IRQchips. Summary: Fix a lockdep issue: the threaded irqchips also need their unique key, and take this opportunity to get rid of the horrible macro and replace it with a static inline" * tag 'gpio-v4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: provide lockdep keys for nested/unnested irqchips
Diffstat (limited to 'include/drm')