summaryrefslogtreecommitdiff
path: root/package/compcache
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-07-24 23:07:35 +0000
committerJohn Crispin <john@openwrt.org>2012-07-24 23:07:35 +0000
commit2113c65f958f4dc0a7507dc561514f287c404b8e (patch)
tree9ac305c4dbfb6b184832daec102aeaf311f0392f /package/compcache
parent8029fefe5c42e8e71ee9944d64b322afbdeaf8a6 (diff)
downloadmtk-20170518-2113c65f958f4dc0a7507dc561514f287c404b8e.zip
mtk-20170518-2113c65f958f4dc0a7507dc561514f287c404b8e.tar.gz
mtk-20170518-2113c65f958f4dc0a7507dc561514f287c404b8e.tar.bz2
fixes build for 3.x kernel and remove old 2.6.x references
Signed-off-by: christoph.thielecke@gmx.de SVN-Revision: 32832
Diffstat (limited to 'package/compcache')
-rw-r--r--package/compcache/Makefile2
-rw-r--r--package/compcache/patches/003-kernel-3.x-compat.patch31
2 files changed, 32 insertions, 1 deletions
diff --git a/package/compcache/Makefile b/package/compcache/Makefile
index 971e737..5106293 100644
--- a/package/compcache/Makefile
+++ b/package/compcache/Makefile
@@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/ramzswap
SUBMENU:=Other modules
- DEPENDS:=@BUSYBOX_CONFIG_SWAPONOFF @!(LINUX_2_6_38||LINUX_2_6_39)
+ DEPENDS:=@BUSYBOX_CONFIG_SWAPONOFF
TITLE:=Driver for compressed ram swap device
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE)
FILES:=$(PKG_BUILD_DIR)/ramzswap.ko \
diff --git a/package/compcache/patches/003-kernel-3.x-compat.patch b/package/compcache/patches/003-kernel-3.x-compat.patch
new file mode 100644
index 0000000..70996eb
--- /dev/null
+++ b/package/compcache/patches/003-kernel-3.x-compat.patch
@@ -0,0 +1,31 @@
+Index: compcache-0.6.2/ramzswap_drv.c
+===================================================================
+--- compcache-0.6.2.orig/ramzswap_drv.c 2012-07-25 01:02:39.000000000 +0200
++++ compcache-0.6.2/ramzswap_drv.c 2012-07-25 01:04:29.270750850 +0200
+@@ -525,7 +525,7 @@
+
+ if (S_ISBLK(inode->i_mode)) {
+ bdev = I_BDEV(inode);
+- ret = bd_claim(bdev, setup_backing_swap);
++ ret = blkdev_get(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, setup_backing_swap);
+ if (ret < 0) {
+ bdev = NULL;
+ goto bad_param;
+@@ -557,7 +557,7 @@
+
+ bad_param:
+ if (bdev)
+- bd_release(bdev);
++ blkdev_put(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+ filp_close(swap_file, NULL);
+
+ out:
+@@ -1097,7 +1097,7 @@
+ /* Close backing swap device, if present */
+ if (rzs->backing_swap) {
+ if (is_backing_blkdev)
+- bd_release(rzs->backing_swap);
++ blkdev_put(rzs->backing_swap, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+ filp_close(rzs->swap_file, NULL);
+ rzs->backing_swap = NULL;
+ memset(rzs->backing_swap_name, 0, MAX_SWAP_NAME_LEN);