rpms/staging-kmod/F-16 declare_zsmalloc_license_and_init_exit_functions.patch, NONE, 1.1 staging-kmod.spec, 1.69, 1.70

Thorsten Leemhuis thl at rpmfusion.org
Mon Sep 17 19:09:24 CEST 2012


Author: thl

Update of /cvs/free/rpms/staging-kmod/F-16
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv31865

Modified Files:
	staging-kmod.spec 
Added Files:
	declare_zsmalloc_license_and_init_exit_functions.patch 
Log Message:
* Mon Sep 17 2012 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.4.2-2.1
- Fix stupid thinko to make crypto stuff for rtl8192e work
- Fix zram


declare_zsmalloc_license_and_init_exit_functions.patch:
 zsmalloc-main.c |   29 +++++++++--------------------
 1 file changed, 9 insertions(+), 20 deletions(-)

--- NEW FILE declare_zsmalloc_license_and_init_exit_functions.patch ---
diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
index fb54a9b94c33..4ba1911f97ff 100644
--- a/drivers/staging/zsmalloc/zsmalloc-main.c
+++ b/drivers/staging/zsmalloc/zsmalloc-main.c
@@ -471,13 +471,7 @@ static struct page *find_get_zspage(struct size_class *class)
 }
 
 
-/*
- * If this becomes a separate module, register zs_init() with
- * module_init(), zs_exit with module_exit(), and remove zs_initialized
-*/
-static int zs_initialized;
-
-static int zs_cpu_notifier(struct notifier_block *nb, unsigned long action,
+static int zs_cpu_notifier(struct notifier_block *nb, unsigned long action,
 				void *pcpu)
 {
 	int cpu = (long)pcpu;
@@ -508,7 +502,7 @@ static struct notifier_block zs_cpu_nb = {
 	.notifier_call = zs_cpu_notifier
 };
 
-static void zs_exit(void)
+static void __exit zs_exit(void)
 {
 	int cpu;
 
@@ -517,7 +511,7 @@ static void zs_exit(void)
 	unregister_cpu_notifier(&zs_cpu_nb);
 }
 
-static int zs_init(void)
+static int __init zs_init(void)
 {
 	int cpu, ret;
 
@@ -562,17 +556,6 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
 
 	}
 
-	/*
-	 * If this becomes a separate module, register zs_init with
-	 * module_init, and remove this block
-	*/
-	if (!zs_initialized) {
-		error = zs_init();
-		if (error)
-			goto cleanup;
-		zs_initialized = 1;
-	}
-
 	pool->flags = flags;
 	pool->name = name;
 
@@ -799,3 +782,9 @@ u64 zs_get_total_size_bytes(struct zs_pool *pool)
 	return npages << PAGE_SHIFT;
 }
 EXPORT_SYMBOL_GPL(zs_get_total_size_bytes);
+
+MODULE_AUTHOR("Nitin Gupta <ngupta at vflare.org>");
+MODULE_LICENSE("Dual BSD/GPL");
+
+module_init(zs_init);
+module_exit(zs_exit);


Index: staging-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/staging-kmod/F-16/staging-kmod.spec,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- staging-kmod.spec	26 Aug 2012 15:25:24 -0000	1.69
+++ staging-kmod.spec	17 Sep 2012 17:09:23 -0000	1.70
@@ -21,7 +21,7 @@
 
 Name:          staging-kmod
 Version:       3.4.2
-Release:       %{?prever:0.}1%{?prever:.%{prever}}%{?dist}.9
+Release:       %{?prever:0.}2%{?prever:.%{prever}}%{?dist}.1
 Summary:       Selected kernel modules from linux-staging
 
 Group:         System Environment/Kernel
@@ -29,6 +29,8 @@
 URL:           http://www.kernel.org/
 # a script to create this archive is part of staging-kmod-addons
 Source0:       linux-staging-%{version}%{?prever:-%{prever}}.tar.bz2
+# taken from http://driverdev.linuxdriverproject.org/pipermail/devel/2012-June/027381.html
+Patch1:        declare_zsmalloc_license_and_init_exit_functions.patch
 
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: %{_bindir}/kmodtool
@@ -53,6 +55,10 @@
 # disable drivers that are enabled in Fedora's kernel, as those otherweise would get build
 sed -i 's|.*DABUSB.*||; s|.*SE401.*||;  s|.*VICAM.*||; s|.CRYSTALH||; s|.*LIRC.*||; ' $(find linux-staging-%{version}%{?prever:-%{prever}}/drivers/staging/ -name 'Makefile')
 
+cd linux-staging-%{version}%{?prever:-%{prever}}
+%patch1  -p1
+cd -
+
 # seperate directories for each kernel variant (PAE, non-PAE, ...) we build the modules for
 for kernel_version in %{?kernel_versions} ; do
  cp -a linux-staging-%{version}%{?prever:-%{prever}}/ _kmod_build_${kernel_version%%___*}
@@ -88,7 +94,7 @@
        configops="${configops} CONFIG_R8712_AP=y"
        ;;
      RTL8192E)
-       configops="${configops} CONFIG_RTLLIB=m RTLLIB_CRYPTO_CCMP=m RTLLIB_CRYPTO_TKIP=m RTLLIB_CRYPTO_WEP=m "
+       configops="${configops} CONFIG_RTLLIB=m CONFIG_RTLLIB_CRYPTO_CCMP=m CONFIG_RTLLIB_CRYPTO_TKIP=m CONFIG_RTLLIB_CRYPTO_WEP=m "
        ;;
      SLICOSS)
        # does not build on ppc and ppc64 as of 011109; tested with 2.6.30.9 and 2.6.31.5
@@ -134,26 +140,9 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
-* Sun Aug 26 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.9
-- Rebuilt for updated kernel
-
-* Thu Aug 16 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.8
-- Rebuilt for updated kernel
-
-* Tue Jul 31 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.7
-- Rebuilt for updated kernel
-
-* Thu Jul 26 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.6
-- Rebuilt for updated kernel
-
-* Tue Jul 17 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.5
-- Rebuilt for updated kernel
-
-* Fri Jul 06 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.4
-- Rebuilt for updated kernel
-
-* Thu Jun 28 2012 Nicolas Chauvet <kwizart at gmail.com> - 3.4.2-1.3
-- Rebuilt for updated kernel
+* Mon Sep 17 2012 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.4.2-2.1
+- Fix stupid thinko to make crypto stuff for rtl8192e work
+- Fix zram
 
 * Sat Jun 23 2012 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.4.2-1.2
 - Enable R8712U for F16, as it is enabled in F17 only


More information about the rpmfusion-commits mailing list