summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/hcfpcimodem/files/hcfpcimodem-1.08-upstream-20051215.patch')
-rw-r--r--net-dialup/hcfpcimodem/files/hcfpcimodem-1.08-upstream-20051215.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/net-dialup/hcfpcimodem/files/hcfpcimodem-1.08-upstream-20051215.patch b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.08-upstream-20051215.patch
new file mode 100644
index 000000000000..6b1dfef26eb6
--- /dev/null
+++ b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.08-upstream-20051215.patch
@@ -0,0 +1,49 @@
+diff -Nru hcfpcimodem-1.08full.orig/modules/GPL/oscompat.h hcfpcimodem-1.08full/modules/GPL/oscompat.h
+--- hcfpcimodem-1.08full.orig/modules/GPL/oscompat.h 2005-09-18 00:42:03.000000000 +0300
++++ hcfpcimodem-1.08full/modules/GPL/oscompat.h 2005-12-15 01:22:24.163927500 +0200
+@@ -550,7 +550,11 @@
+ #define CLASS_DEVICE_DESTROY(class, dev) class_simple_device_remove(dev)
+ #define CLASS_CREATE(owner, name) class_simple_create(owner, name)
+ #else
++#ifdef FOUND_CLASS_DEVICE_PARENT
++#define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, NULL, dev, device, fmt, rest)
++#else
+ #define CLASS_DEVICE_CREATE(class, dev, device, fmt, rest) class_device_create(class, dev, device, fmt, rest)
++#endif
+ #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)
+diff -Nru hcfpcimodem-1.08full.orig/modules/Makefile hcfpcimodem-1.08full/modules/Makefile
+--- hcfpcimodem-1.08full.orig/modules/Makefile 2005-10-21 19:15:04.000000000 +0300
++++ hcfpcimodem-1.08full/modules/Makefile 2005-12-15 01:23:06.498573250 +0200
+@@ -80,8 +80,10 @@
+ FOUND_CLASS_SIMPLE := $(shell grep -q 'class_simple_device_add' ${REAL_KERNELSRC}/include/linux/device.h 2>/dev/null && echo -DFOUND_CLASS_SIMPLE)
+ FOUND_UART_REGISTER_PORT := $(shell grep -q 'uart_register_port' ${REAL_KERNELSRC}/include/linux/serial_core.h 2>/dev/null && echo -DFOUND_UART_REGISTER_PORT)
+ FOUND_TTY_START_STOP := $(shell grep -q 'stop_tx.*tty_stop' ${REAL_KERNELSRC}/include/linux/serial_core.h 2>/dev/null && echo -DFOUND_TTY_START_STOP)
+-
+-CFLAGS+= $(FOUND_CLASS_SIMPLE) $(FOUND_UART_REGISTER_PORT) $(FOUND_TTY_START_STOP)
++FOUND_CLASS_DEVICE_PARENT := $(shell grep -q 'struct[ \t]*class_device[ \t]*\*[ \t]*parent' ${REAL_KERNELSRC}/include/linux/device.h 2>/dev/null && echo -DFOUND_CLASS_DEVICE_PARENT)
++FOUND_REFRIGERATOR := $(shell grep -q 'refrigerator' ${REAL_KERNELSRC}/include/linux/suspend.h 2>/dev/null && echo -DFOUND_REFRIGERATOR)
++
++CFLAGS+= $(FOUND_CLASS_SIMPLE) $(FOUND_UART_REGISTER_PORT) $(FOUND_TTY_START_STOP) $(FOUND_CLASS_DEVICE_PARENT) $(FOUND_REFRIGERATOR)
+
+ else
+ KO= o
+diff -Nru hcfpcimodem-1.08full.orig/modules/osservices.c hcfpcimodem-1.08full/modules/osservices.c
+--- hcfpcimodem-1.08full.orig/modules/osservices.c 2005-09-11 08:29:12.000000000 +0300
++++ hcfpcimodem-1.08full/modules/osservices.c 2005-12-15 01:22:28.508199000 +0200
+@@ -519,8 +519,13 @@
+
+ if(signal_pending(current)) {
+ handle_sigs();
+- } else
++ } else {
++#ifdef FOUND_REFRIGERATOR
++ if (current->flags & PF_FREEZE)
++ refrigerator(PF_FREEZE);
++#endif
+ schedule();
++ }
+ }
+ current->state = TASK_RUNNING;
+ remove_wait_queue(&osthrd->wq, &wait);