Skip to content

Commit

Permalink
Input: fix PWM-related undefined reference errors
Browse files Browse the repository at this point in the history
This patch adds a PWM dependency to configure the INPUT_MAX8997_HAPTIC
and INPUT_PWM_BEEPER. Without this patch, build system can lead to build
failure. This was observed during randconfig testing, in which
INPUT_MAX8997_HAPTIC or INPUT_PWM_BEEPER was enabled w/o PWM being
enabled, leading to the following errors:

init/built-in.o
drivers/built-in.o: In function `max8997_haptic_disable':
:(.text+0x1073a0): undefined reference to `pwm_disable'
drivers/built-in.o: In function `max8997_haptic_remove':
:(.text+0x1073fc): undefined reference to `pwm_free'
drivers/built-in.o: In function `max8997_haptic_play_effect_work':
:(.text+0x1074f0): undefined reference to `pwm_config'
:(.text+0x1075b0): undefined reference to `pwm_enable'
drivers/built-in.o: In function `max8997_haptic_probe':
:(.text+0x1076f8): undefined reference to `pwm_request'
:(.text+0x1077e8): undefined reference to `pwm_free'
drivers/built-in.o: In function `pwm_beeper_resume':
:(.text+0x1081a4): undefined reference to `pwm_config'
make: *** [vmlinux] Error 1

Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Majunath Goudar authored and Dmitry Torokhov committed Oct 22, 2013
1 parent 9354f26 commit 33777f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ config INPUT_MAX8925_ONKEY

config INPUT_MAX8997_HAPTIC
tristate "MAXIM MAX8997 haptic controller support"
depends on HAVE_PWM && MFD_MAX8997
depends on PWM && HAVE_PWM && MFD_MAX8997
select INPUT_FF_MEMLESS
help
This option enables device driver support for the haptic controller
Expand Down Expand Up @@ -461,7 +461,7 @@ config INPUT_PCF8574

config INPUT_PWM_BEEPER
tristate "PWM beeper support"
depends on HAVE_PWM || PWM
depends on PWM && HAVE_PWM
help
Say Y here to get support for PWM based beeper devices.

Expand Down

0 comments on commit 33777f3

Please sign in to comment.