Commit c2369d3f authored by Linus Walleij's avatar Linus Walleij

gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional

After adding the DT matching in
commit 6f29c9af
"gpio: pca935x: fix of-only probed devices"
compilation fails like this:

CC [M]  drivers/gpio/gpio-pca953x.o
gpio-pca953x.c: In function ‘pca953x_probe’:
gpio-pca953x.c:693:11: error: implicit declaration of
function ‘of_match_device’ [-Werror=implicit-function-declaration]
match = of_match_device(pca953x_dt_ids, &client->dev);
        ^
gpio-pca953x.c:693:9: warning: assignment makes pointer from
integer without a cast [-Wint-conversion]
match = of_match_device(pca953x_dt_ids, &client->dev);
        ^
cc1: some warnings being treated as errors
../scripts/Makefile.build:264: recipe for target
'drivers/gpio/gpio-pca953x.o' failed

After removing the conditional inclusion guards compilation
works fine again. Might be a module problem so that
fix.

Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6f29c9af
......@@ -18,9 +18,7 @@
#include <linux/i2c.h>
#include <linux/platform_data/pca953x.h>
#include <linux/slab.h>
#ifdef CONFIG_OF_GPIO
#include <linux/of_platform.h>
#endif
#include <linux/acpi.h>
#define PCA953X_INPUT 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment