Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 68533 Details for
Bug 106103
hcfpcimodem-1.0.6.ebuild (updated ebuild with 2.6.13 patch)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from Linuxant for running hcfpci modem driver on kernel 2.6.13
hcfpcimodem-1.06-simple_class.patch (text/plain), 5.00 KB, created by
Douglas Robertson
on 2005-09-15 13:33:16 UTC
(
hide
)
Description:
patch from Linuxant for running hcfpci modem driver on kernel 2.6.13
Filename:
MIME Type:
Creator:
Douglas Robertson
Created:
2005-09-15 13:33:16 UTC
Size:
5.00 KB
patch
obsolete
>diff -urN hcfpcimodem-1.06full/modules/GPL/oscompat.h hcfpcimodem-1.06full-simple_class/modules/GPL/oscompat.h >--- hcfpcimodem-1.06full/modules/GPL/oscompat.h 2005-06-20 15:18:46.000000000 -0400 >+++ hcfpcimodem-1.06full-simple_class/modules/GPL/oscompat.h 2005-09-07 18:16:54.000000000 -0400 >@@ -543,4 +543,16 @@ > #define PCI_SLOT_NAME(x) (x)->dev.bus_id > #endif > >+#ifdef FOUND_CLASS_SIMPLE >+#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_simple_device_add(class, dev, device, fmt, rest) >+#define CLASS_DESTROY(class) class_simple_destroy(class) >+#define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev) >+#define CLASS_CREATE(owner, name) class_simple_create(owner, name) >+#else >+#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest) >+#define CLASS_DESTROY(class) class_destroy(class) >+#define CLASS_DEVICE_DESTROY(class, dev) class_device_destroy(class, dev) >+#define CLASS_CREATE(owner, name) class_create(owner, name) >+#endif >+ > #endif /* __OSCOMPAT_H */ >diff -urN hcfpcimodem-1.06full/modules/Makefile hcfpcimodem-1.06full-simple_class/modules/Makefile >--- hcfpcimodem-1.06full/modules/Makefile 2005-06-20 15:25:00.000000000 -0400 >+++ hcfpcimodem-1.06full-simple_class/modules/Makefile 2005-09-07 18:16:54.000000000 -0400 >@@ -48,6 +48,16 @@ > KMODS_DIR := /lib/modules/$(KERNELVER) > CNXT_MODS_DIR := $(KMODS_DIR)/extra > >+# On SuSE 9.0 and up, CNXT_KERNELSRC points to an incomplete kernel source >+# directory and some include files are not available in this tree >+SUSE_OBJ_TREE := $(shell if grep -q '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" && [ -d "${CNXT_KERNELSRC}" ]; then echo "yes"; else echo "no"; fi) >+ >+ifeq ($(SUSE_OBJ_TREE),yes) >+REAL_KERNELSRC := $(shell grep '^KERNELSRC ' "${CNXT_KERNELSRC}/Makefile" | awk '{print $3}') >+else >+REAL_KERNELSRC := $(CNXT_KERNELSRC) >+endif >+ > FOUND_PCI_DEV_SLOT_NAME := $(shell grep -q 'slot_name' ${CNXT_KERNELSRC}/include/linux/pci.h 2> /dev/null && echo -DFOUND_PCI_DEV_SLOT_NAME) > CFLAGS+= $(FOUND_PCI_DEV_SLOT_NAME) > >@@ -57,6 +67,9 @@ > KO= ko > KBUILD_EXTMOD_SUPPORTED := $(shell egrep -q 'KBUILD_EXTMOD|KERNEL_SOURCE|KERNELSRC' ${CNXT_KERNELSRC}/Makefile 2>/dev/null && echo yes || echo no) > >+FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${REAL_KERNELSRC}/include/linux/device.h 2> /dev/null && echo -DFOUND_CLASS_SIMPLE) >+CFLAGS+= $(FOUND_CLASS_SIMPLE) >+ > else > KO= o > # Configure compiler (on some systems, kgcc must be used to compile kernel code) >diff -urN hcfpcimodem-1.06full/modules/osdiag.c hcfpcimodem-1.06full-simple_class/modules/osdiag.c >--- hcfpcimodem-1.06full/modules/osdiag.c 2004-12-14 02:50:07.000000000 -0500 >+++ hcfpcimodem-1.06full-simple_class/modules/osdiag.c 2005-09-07 18:17:35.000000000 -0400 >@@ -30,7 +30,11 @@ > static struct list_head diag_instance_list = LIST_HEAD_INIT(diag_instance_list); > static spinlock_t diag_lock = SPIN_LOCK_UNLOCKED; > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) >+#ifdef FOUND_CLASS_SIMPLE > static struct class_simple *diag_class; >+#else >+static struct class *diag_class; >+#endif > #endif > > #define common_instance_header \ >@@ -659,7 +663,7 @@ > #else > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) > if (!IS_ERR(diag_class)) { >- class_simple_device_add(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum); >+ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum); > } > #endif > >@@ -764,7 +768,7 @@ > } > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) > if (!IS_ERR(diag_class)) >- class_simple_device_remove(MKDEV(diagmajor, pDiag->hwInstNum)); >+ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, pDiag->hwInstNum)); > #endif > #endif > >@@ -834,14 +838,14 @@ > devfs_remove(CNXTTARGET"diagdmp"); > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) > if (!IS_ERR(diag_class)) >- class_simple_device_remove(MKDEV(diagmajor, CNXTDIAGDMPMINOR)); >+ CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR)); > #endif > #endif > #endif /* DMP || DMP_RETAIL */ > > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) > if (!IS_ERR(diag_class)) >- class_simple_destroy(diag_class); >+ CLASS_DESTROY(diag_class); > #endif > if(diagmajor > 0) > unregister_chrdev(diagmajor, CNXTTARGET"diag"); >@@ -865,7 +869,7 @@ > } > > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) >- diag_class = class_simple_create(THIS_MODULE, CNXTTARGET"diag"); >+ diag_class = CLASS_CREATE(THIS_MODULE, CNXTTARGET"diag"); > if (IS_ERR(diag_class)) { > printk(KERN_ERR "%s: cannot create simple class (%ld)\n", __FUNCTION__, PTR_ERR(diag_class)); > if(diagmajor > 0) >@@ -884,7 +888,7 @@ > #else > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) > if (!IS_ERR(diag_class)) { >- class_simple_device_add(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp"); >+ CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp"); > } > #endif > devfs_mk_cdev(MKDEV(diagmajor, CNXTDIAGDMPMINOR), S_IFCHR | S_IRUSR | S_IWUSR, CNXTTARGET"diagdmp");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 106103
: 68533 |
68534