Skip to content

Commit

Permalink
gpio: pch: add slab include
Browse files Browse the repository at this point in the history
After change 3ff35cb
"gpio-pch: Fix Kconfig dependencies"
which enabled COMPILE_TEST as an alternative for the PCH
driver, we get build failures like this:

drivers/gpio/gpio-pch.c: In function 'pch_gpio_probe':
drivers/gpio/gpio-pch.c:359:2: error: implicit declaration
of function 'kzalloc' [-Werror=implicit-function-declaration]
drivers/gpio/gpio-pch.c:359:7: warning: assignment makes
pointer from integer without a cast [enabled by default]
drivers/gpio/gpio-pch.c:442:2: error: implicit declaration
of function 'kfree' [-Werror=implicit-function-declaration]

Fix this by including <linux/slab.h> explicitly.

Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed May 27, 2014
1 parent 51caa05 commit 349b6c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpio-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/slab.h>

#define PCH_EDGE_FALLING 0
#define PCH_EDGE_RISING BIT(0)
Expand Down

0 comments on commit 349b6c5

Please sign in to comment.