Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: atmel_pwm: only build for supported platforms

There is architecture code in mach-at91 that depends on the
CONFIG_ATMEL_PWM symbol in order to call the soc-specific
at91_add_device_pwm function. While all of this is about code
that will be removed in the future, using DT probing and
the PWM framework, we currently get a build failure:

arch/arm/mach-at91/built-in.o: In function `at91_pwm_leds':
arch/arm/mach-at91/leds.c:88: undefined reference to `at91_add_device_pwm'

This patch ensures we only try to build this driver on
platforms on which it will build and work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
1690e35f c919951d

+2 -1
+2 -1
drivers/misc/Kconfig
··· 53 53 54 54 config ATMEL_PWM 55 55 tristate "Atmel AT32/AT91 PWM support" 56 - depends on HAVE_CLK && (AVR32 || ARCH_AT91 || COMPILE_TEST) 56 + depends on HAVE_CLK 57 + depends on AVR32 || AT91SAM9263 || AT91SAM9RL || AT91SAM9G45 57 58 help 58 59 This option enables device driver support for the PWM channels 59 60 on certain Atmel processors. Pulse Width Modulation is used for