lkml.org 
[lkml]   [2007]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[-mm patch] drivers/battery/olpc_battery.c: fix compilation
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
> <cbou@mail.ru>). 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 <bunk@stusta.de>

---
--- 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-05 19:23    [W:0.491 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site