linux-stable/arch/metag
Guenter Roeck 35d04077ad metag: Only define atomic_dec_if_positive conditionally
The definition of atomic_dec_if_positive() assumes that
atomic_sub_if_positive() exists, which is only the case if
metag specific atomics are used. This results in the following
build error when trying to build metag1_defconfig.

kernel/ucount.c: In function 'dec_ucount':
kernel/ucount.c:211: error:
	implicit declaration of function 'atomic_sub_if_positive'

Moving the definition of atomic_dec_if_positive() into the metag
conditional code fixes the problem.

Fixes: 6006c0d8ce ("metag: Atomics, locks and bitops")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: <stable@vger.kernel.org> # 3.9.x-
2016-10-07 21:35:21 +01:00
..
boot metag: enable building of all dtbs 2015-10-27 16:12:16 -05:00
configs
include metag: Only define atomic_dec_if_positive conditionally 2016-10-07 21:35:21 +01:00
kernel Metag architecture changes for v4.8 2016-08-05 08:58:00 -04:00
lib metag: Fix typos 2016-07-15 09:55:49 +01:00
mm metag: Drop show_mem() from mem_init() 2016-08-09 13:41:30 +01:00
oprofile
tbx metag: Fix misspellings in comments. 2016-04-18 12:45:54 +02:00
Kconfig lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
Kconfig.debug
Kconfig.soc metag: remove ARCH_WANT_OPTIONAL_GPIOLIB 2016-04-26 13:39:22 +02:00
Makefile metag: use common make variables for dtb builds 2015-10-27 16:12:15 -05:00