#ifndef __ASM_GENERIC_DELAY_H #define __ASM_GENERIC_DELAY_H /* Undefined functions to get compile-time errors */ extern void __bad_udelay(void); extern void __bad_ndelay(void); extern void __udelay(unsigned long usecs); extern void __ndelay(unsigned long nsecs); extern void __const_udelay(unsigned long xloops); extern void __delay(unsigned long loops); /* * The weird n/20000 thing suppresses a "comparison is always false due to * limited range of data type" warning with non-const 8-bit arguments. */ /* 0x10c7 is 2**32 / 1000000 (rounded up) */ #define udelay(n) \ ({ \ if (__builtin_constant_p(n)) { \ if ((n) / 20000 >= 1) \ __bad_udelay(); \ else \ __const_udelay((n) * 0x10c7ul); \ } else { \ __udelay(n); \ } \ }) /* 0x5 is 2**32 / 1000000000 (rounded up) */ #define ndelay(n) \ ({ \ if (__builtin_constant_p(n)) { \ if ((n) / 20000 >= 1) \ __bad_ndelay(); \ else \ __const_udelay((n) * 5ul); \ } else { \ __ndelay(n); \ } \ }) #endif /* __ASM_GENERIC_DELAY_H */ -cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-02 16:59:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-02 16:59:44 +0100
commit890b73af6b008a7d59bdbab2dd59bd7b212dbc60 (patch)
tree871704f4aec3e77d4d13b3d2878928f0e078cacb /include/drm
parent0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff)
parent65e4345c8ef8811bbb4860fe5f2df10646b7f2e1 (diff)
Merge tag 'iio-fixes-for-4.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: First round of IIO fixes for the 4.10 cycle. * 104-quad-8 - Fix selecting wrong register when the index control register is desired. - Fix an off by one error when addressing the input/output control register. - Fix inverted logic on the active high / low control * bmi160 - Sleep for worst case rather than best case amount of time after cmd execution begins. * max44000 - typo fix in illuminance_integration_time_available listing. * st-sensors - Fix channel data passing. This one took a while to get tested on 24bit parts. Definitely one for stable asap as the bug broke quite a few parts. - lis3lv02 needs a data alignment bit set and the scaling was wrong. * ti_am335x - depend on HAS_DMA
Diffstat (limited to 'include/drm')