rpms/em8300-kmod/F-8 em8300-kmod-0.16.3-2626.patch, NONE, 1.1 em8300-kmod.spec, 1.61, 1.62

Ville Skyttä scop at fedoraproject.org
Mon Oct 27 16:52:22 UTC 2008


Author: scop

Update of /cvs/pkgs/rpms/em8300-kmod/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17985

Modified Files:
	em8300-kmod.spec 
Added Files:
	em8300-kmod-0.16.3-2626.patch 
Log Message:
* Mon Oct 27 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.16.3-9
- Patch for kernel 2.6.26 compatibility (still not upgrading to later
  upstream versions due to lack of WSS patches for them).
- Build for kernel 2.6.26.6-49.fc8.


em8300-kmod-0.16.3-2626.patch:

--- NEW FILE em8300-kmod-0.16.3-2626.patch ---
# HG changeset patch
# User Christian Gmeiner <christian.gmeiner at gmail.com>
# Date 1213684796 -7200
# Node ID 1f6e519f4e6d047464a35278ba273ff70554cb15
# Parent  062e2274801926c4f048fc29c2e89dc8b9c0b6ad
As proc_root export has been removed (commit: c74c120a21d87b0b6925ada5830d8cac21e852d9),
we need to replace proc_root with NULL to get this part of driver compiling again.

diff -r 062e22748019 -r 1f6e519f4e6d modules/em8300_procfs.c
--- a/modules/em8300_procfs.c	Fri May 16 01:12:12 2008 +0200
+++ b/modules/em8300_procfs.c	Tue Jun 17 08:39:56 2008 +0200
@@ -171,7 +171,7 @@
 static void em8300_procfs_unregister_driver(void)
 {
 	if (em8300_proc) {
-		remove_proc_entry(EM8300_PROCFS_DIR, &proc_root);
+		remove_proc_entry(EM8300_PROCFS_DIR, NULL);
 	}
 }
 
@@ -179,7 +179,7 @@
 {
 	em8300_proc = create_proc_entry(EM8300_PROCFS_DIR,
 					S_IFDIR | S_IRUGO | S_IXUGO,
-					&proc_root);
+					NULL);
 	if (em8300_proc) {
 		em8300_proc->owner = THIS_MODULE;
 	} else {
# HG changeset patch
# User Nicolas Boullis <nboullis at debian.org>
# Date 1216244734 -7200
# Node ID 8bfd80c74fa2f63d5f617d48ce2998580cfc68e2
# Parent  1f6e519f4e6d047464a35278ba273ff70554cb15
Handle the removal of the class_device structure in linux 2.6.26.

Thanks to Christian Gmeiner who noticed the proble, and proposed a patch
to solve the problem (in a different way).

Small "regression": em8300_ma-#, em8300_mv-# and em8300_sp-# are no
longer subdevices of em8300-#.

diff -r 1f6e519f4e6d -r 8bfd80c74fa2 include/linux/em8300.h
--- a/include/linux/em8300.h	Tue Jun 17 08:39:56 2008 +0200
+++ b/include/linux/em8300.h	Wed Jul 16 23:45:34 2008 +0200
@@ -322,14 +322,6 @@
 	ulong memsize;
 	
 	int playmode;
-	
-	/* Sysfs */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,46)
-	struct class_device *classdev;
-	struct class_device *classdev_mv;
-	struct class_device *classdev_ma;
-	struct class_device *classdev_sp;
-#endif
 
 #if defined(CONFIG_SND) || defined(CONFIG_SND_MODULE)
 	snd_card_t *alsa_card;
diff -r 1f6e519f4e6d -r 8bfd80c74fa2 modules/em8300_udev.c
--- a/modules/em8300_udev.c	Tue Jun 17 08:39:56 2008 +0200
+++ b/modules/em8300_udev.c	Wed Jul 16 23:45:34 2008 +0200
@@ -29,9 +29,21 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
 #define class class_simple
 #define class_create class_simple_create
-#define class_device_create class_simple_device_add
-#define class_device_destroy(cls, dev) class_simple_device_remove(dev)
 #define class_destroy class_simple_destroy
+#define device_create(cls, parent, devt, fmt, args...) \
+	class_simple_device_add(cls, devt, parent, fmt, ## args)
+#define device_destroy(cls, devt) \
+	class_simple_device_remove(devt)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+#define device_create(cls, parent, devt, fmt, args...) \
+	class_device_create(cls, devt, parent, fmt, ## args)
+#define device_destroy(cls, devt) \
+	class_device_destroy(cls, devt)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#define device_create(cls, parent, devt, fmt, args...) \
+	class_device_create(cls, NULM, devt, parent, fmt, ## args)
+#define device_destroy(cls, devt) \
+	class_device_destroy(cls, devt)
 #endif
 
 #include "em8300_params.h"
@@ -45,58 +57,38 @@
 
 static void em8300_udev_register_card(struct em8300_s *em)
 {
-	em->classdev = class_device_create(em8300_class,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-					   NULL,
-#endif
-					   MKDEV(major, em->card_nr * 4 + 0),
-					   &em->dev->dev,
-					   "%s-%d",
-					   EM8300_LOGNAME, em->card_nr);
+	device_create(em8300_class, &em->dev->dev,
+		      MKDEV(major, em->card_nr * 4 + 0),
+		      "%s-%d", EM8300_LOGNAME, em->card_nr);
 }
 
 static void em8300_udev_enable_card(struct em8300_s *em)
 {
-	em->classdev_mv = class_device_create(em8300_class,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-					      em->classdev,
-#endif
-					      MKDEV(major, em->card_nr * 4 + 1),
-					      &em->dev->dev,
-					      "%s_mv-%d",
-					      EM8300_LOGNAME, em->card_nr);
+	device_create(em8300_class, &em->dev->dev,
+		      MKDEV(major, em->card_nr * 4 + 1),
+		      "%s_mv-%d", EM8300_LOGNAME, em->card_nr);
 	if ((audio_driver_nr[em->card_nr] == AUDIO_DRIVER_OSSLIKE)
 	    || (audio_driver_nr[em->card_nr] == AUDIO_DRIVER_OSS))
-		em->classdev_ma = class_device_create(em8300_class,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-						      em->classdev,
-#endif
-						      MKDEV(major, em->card_nr * 4 + 2),
-						      &em->dev->dev,
-						      "%s_ma-%d",
-						      EM8300_LOGNAME, em->card_nr);
-	em->classdev_sp = class_device_create(em8300_class,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-					      em->classdev,
-#endif
-					      MKDEV(major, em->card_nr * 4 + 3),
-					      &em->dev->dev,
-					      "%s_sp-%d",
-					      EM8300_LOGNAME, em->card_nr);
+		device_create(em8300_class, &em->dev->dev,
+			      MKDEV(major, em->card_nr * 4 + 2),
+			      "%s_ma-%d", EM8300_LOGNAME, em->card_nr);
+	device_create(em8300_class, &em->dev->dev,
+		      MKDEV(major, em->card_nr * 4 + 3),
+		      "%s_sp-%d", EM8300_LOGNAME, em->card_nr);
 }
 
 static void em8300_udev_disable_card(struct em8300_s *em)
 {
-	class_device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 1));
+	device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 1));
 	if ((audio_driver_nr[em->card_nr] == AUDIO_DRIVER_OSSLIKE)
 	    || (audio_driver_nr[em->card_nr] == AUDIO_DRIVER_OSS))
-		class_device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 2));
-	class_device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 3));
+		device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 2));
+	device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 3));
 }
 
 static void em8300_udev_unregister_card(struct em8300_s *em)
 {
-	class_device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 0));
+	device_destroy(em8300_class, MKDEV(major, em->card_nr * 4 + 0));
 }
 
 static void em8300_udev_unregister_driver(void)


Index: em8300-kmod.spec
===================================================================
RCS file: /cvs/pkgs/rpms/em8300-kmod/F-8/em8300-kmod.spec,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- em8300-kmod.spec	13 Aug 2008 05:01:19 -0000	1.61
+++ em8300-kmod.spec	27 Oct 2008 16:51:52 -0000	1.62
@@ -4,7 +4,7 @@
 # end stuff to be ...
 
 # hardcode for now:
-%{!?kversion: %define kversion 2.6.25.14-69.fc8}
+%{!?kversion: %define kversion 2.6.26.6-49.fc8}
 
 %define kmod_name em8300
 %define kverrel %(%{kmodtool} verrel %{?kversion} 2>/dev/null)
@@ -25,7 +25,7 @@
 Name:           %{kmod_name}-kmod
 Summary:        Kernel modules for DXR3/Hollywood Plus MPEG decoder cards
 Version:        0.16.3
-Release:        8.%(echo %{kverrel} | tr - _)
+Release:        9.%(echo %{kverrel} | tr - _)
 
 Group:          System Environment/Kernel
 License:        GPLv2+
@@ -35,6 +35,7 @@
 Patch1:         %{name}-0.16.3-2623.patch
 Patch2:         %{name}-0.16.3-2624.patch
 Patch3:         %{name}-0.16.3-2625.patch
+Patch4:         %{name}-0.16.3-2626.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 ExcludeArch:    i386 i586
@@ -51,6 +52,7 @@
 %patch1 -p0
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 cd ..
 for kvariant in %{kvariants} ; do
     cp -a %{kmod_name}-%{version}%{?prever} _kmod_build_$kvariant
@@ -83,6 +85,11 @@
 
 
 %changelog
+* Mon Oct 27 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.16.3-9
+- Patch for kernel 2.6.26 compatibility (still not upgrading to later
+  upstream versions due to lack of WSS patches for them).
+- Build for kernel 2.6.26.6-49.fc8.
+
 * Wed Aug 13 2008 Ville Skyttä <ville.skytta at iki.fi>
 - Rebuild for kernel 2.6.25.14-69.fc8.
 




More information about the scm-commits mailing list