[oe-commits] Koen Kooi : ti-local-power-manager: fix build with recent kernels

git version control git at git.openembedded.org
Mon Dec 6 12:52:47 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 99ef5269e5d0814cf17572e063f6c573a162567d
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=99ef5269e5d0814cf17572e063f6c573a162567d

Author: Koen Kooi <koen at openembedded.org>
Date:   Sun Dec  5 18:32:59 2010 +0100

ti-local-power-manager: fix build with recent kernels

Signed-off-by: Koen Kooi <k-kooi at ti.com>

---

 .../ti/ti-local-power-manager/lpm-BKL-fix.patch    |   39 ++++++++++++++++++++
 recipes/ti/ti-local-power-manager_1.24.02.09.bb    |    2 +
 2 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/recipes/ti/ti-local-power-manager/lpm-BKL-fix.patch b/recipes/ti/ti-local-power-manager/lpm-BKL-fix.patch
new file mode 100644
index 0000000..43bb5a9
--- /dev/null
+++ b/recipes/ti/ti-local-power-manager/lpm-BKL-fix.patch
@@ -0,0 +1,39 @@
+From: Koen Kooi <k-kooi at ti.com>
+Subject: Fix build with 2.6.37rcX
+
+---
+
+--- /tmp/lpm_driver.c	2010-12-05 18:25:17.000000000 +0100
++++ local_power_manager_linux_1_24_02_09/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c	2010-12-05 18:30:13.000000000 +0100
+@@ -40,6 +40,7 @@
+ #include <asm/semaphore.h>
+ #endif
+ #include <linux/io.h>
++#include <linux/slab.h>
+ 
+ #include "lpm_driver.h"
+ #include "lpm_dev.h"
+@@ -111,7 +112,11 @@
+ 
+ static struct file_operations lpm_fops = {
+     .owner =    THIS_MODULE,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+     .ioctl =    lpm_ioctl,
++#else
++    .unlocked_ioctl = lpm_ioctl,
++#endif
+     .open =     lpm_open,
+     .release =  lpm_release,
+ };
+@@ -244,7 +249,11 @@
+         lpm->inst[i].major = MAJOR(lpm->first);
+         lpm->inst[i].minor = MINOR(lpm->first) + i;
+         INIT_LIST_HEAD(&lpm->inst[i].clients);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+         init_MUTEX(&lpm->inst[i].sem);
++#else
++        sema_init(&lpm->inst[i].sem,1);
++#endif
+         init_completion(&lpm->inst[i].event);
+         lpm_devAttrs.os_instance = (void *)&lpm->inst[i];
+         LPM_init(i, &lpm->inst[i].lpm, &lpm_devAttrs);
diff --git a/recipes/ti/ti-local-power-manager_1.24.02.09.bb b/recipes/ti/ti-local-power-manager_1.24.02.09.bb
index 9c8b4df..759561f 100644
--- a/recipes/ti/ti-local-power-manager_1.24.02.09.bb
+++ b/recipes/ti/ti-local-power-manager_1.24.02.09.bb
@@ -3,6 +3,8 @@ require ti-local-power-manager.inc
 PV = "1_24_02_09"
 PE = "1"
 
+SRC_URI += "file://lpm-BKL-fix.patch"
+
 SRC_URI[lpmtarball.md5sum] = "3d05453df26dfc811de04839d74c2f2b" 
 SRC_URI[lpmtarball.sha256sum] = "7335959a6217df17289f81839e6c6948f31cc0797ebc5389edef7190ed3ea589"
 





More information about the Openembedded-commits mailing list