From: Koen Kooi Date: Sun, 5 Dec 2010 17:32:59 +0000 (+0100) Subject: ti-local-power-manager: fix build with recent kernels X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99ef5269e5d0814cf17572e063f6c573a162567d;p=openembedded.git ti-local-power-manager: fix build with recent kernels Signed-off-by: Koen Kooi --- 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 0000000000..43bb5a9acc --- /dev/null +++ b/recipes/ti/ti-local-power-manager/lpm-BKL-fix.patch @@ -0,0 +1,39 @@ +From: Koen Kooi +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 + #endif + #include ++#include + + #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 9c8b4df4e2..759561f38c 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"