[-mm patch] drivers/battery/olpc_battery.c: fix compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21/2.6.21-mm1/
> 
> 
> - Added the git-battery tree to the -mm lineup (Anton Vorontsov
>   <[email protected]>).  It presently generates mysterious depmod error messages.
>...
> Changes since 2.6.21-rc7-mm2:
>...
>  git-battery.patch
>...
>  git trees
>...

This patch fixes the following compile error:

<--  snip  -->

...
  CC      drivers/battery/olpc_battery.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c: In function ‘lock_ec’:
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:42: error: ‘jiffies’ undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:42: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:42: error: for each function it appears in.)
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:42: error: ‘HZ’ undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:48: error: implicit declaration of function ‘time_after’
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/drivers/battery/olpc_battery.c:53: error: implicit declaration of function ‘yield’
make[3]: *** [drivers/battery/olpc_battery.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <[email protected]>

---
--- linux-2.6.21-mm1/drivers/battery/olpc_battery.c.old	2007-05-05 19:05:17.000000000 +0200
+++ linux-2.6.21-mm1/drivers/battery/olpc_battery.c	2007-05-05 19:07:30.000000000 +0200
@@ -13,6 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/external_power.h>
 #include <linux/battery.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
 #include <asm/io.h>
 
 #define wBAT_VOLTAGE     0xf900  /* *9.76/32,    mV   */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux