Skip to content

Commit

Permalink
jz4740-battery: Should include linux/io.h
Browse files Browse the repository at this point in the history
During test-build (with disabled 'depends on') I found that
jz4740-battery driver lacks linux/io.h, which makes build break
like this (on x86):

  CC [M]  drivers/power/isp1704_charger.o
jz4740-battery.c: In function 'jz_battery_read_voltage':
jz4740-battery.c:84: error: implicit declaration of function 'readw’
jz4740-battery.c: In function 'jz_battery_probe':
jz4740-battery.c:284: error: implicit declaration of function 'ioremap_nocache’
jz4740-battery.c:285: warning: assignment makes pointer from integer without a cast
jz4740-battery.c:372: error: implicit declaration of function 'iounmap'
make[2]: *** [drivers/power/jz4740-battery.o] Error 1

This patch fixes the issues, and thus makes it easier to build-test
the driver for me.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
  • Loading branch information
Anton Vorontsov committed Dec 21, 2010
1 parent c66ae9b commit f3dcab7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/jz4740-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/io.h>

#include <linux/delay.h>
#include <linux/gpio.h>
Expand Down

0 comments on commit f3dcab7

Please sign in to comment.