summaryrefslogtreecommitdiff
path: root/package/pcmcia-cs/patches/003-cardmgr_c.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-05 21:34:56 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-12-05 21:34:56 +0000
commit320a788b2a632c1b4215a4acc15fd032ac13ad00 (patch)
treeebd3f43c8fb896bca352067a9703cf5465a05bd8 /package/pcmcia-cs/patches/003-cardmgr_c.patch
parent8021b015e4a052432f4a3a0e99503da489550720 (diff)
sync pcmcia-cs in trunk with whiterussian, add fix for memory ranges
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5693 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/pcmcia-cs/patches/003-cardmgr_c.patch')
-rw-r--r--package/pcmcia-cs/patches/003-cardmgr_c.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/pcmcia-cs/patches/003-cardmgr_c.patch b/package/pcmcia-cs/patches/003-cardmgr_c.patch
new file mode 100644
index 0000000000..7078db7f78
--- /dev/null
+++ b/package/pcmcia-cs/patches/003-cardmgr_c.patch
@@ -0,0 +1,42 @@
+diff -urN pcmcia-cs-3.2.8-old/cardmgr/cardmgr.c pcmcia-cs-3.2.8-new/cardmgr/cardmgr.c
+--- pcmcia-cs-3.2.8-old/cardmgr/cardmgr.c 2004-05-21 08:39:36.000000000 +0200
++++ pcmcia-cs-3.2.8-new/cardmgr/cardmgr.c 2006-03-29 20:27:03.000000000 +0200
+@@ -739,10 +739,7 @@
+ int ret;
+
+ strcpy(cmd, "insmod ");
+- if (strchr(mod, '/') != NULL)
+- sprintf(cmd+7, "%s/%s.o", modpath, mod);
+- else
+- sprintf(cmd+7, "%s/pcmcia/%s.o", modpath, mod);
++ sprintf(cmd+7, "%s/%s.o", modpath, mod);
+ if (access(cmd+7, R_OK) != 0) {
+ syslog(LOG_NOTICE, "module %s not available", cmd+7);
+ free(cmd);
+@@ -808,11 +805,13 @@
+ }
+
+ if (do_modprobe) {
+- if (try_modprobe(mod, opts) != 0)
++ if (try_modprobe(mod, opts) != 0) {
+ try_insmod(mod, opts);
++ }
+ } else {
+- if (try_insmod(mod, opts) != 0)
++ if (try_insmod(mod, opts) != 0) {
+ try_modprobe(mod, opts);
++ }
+ }
+ }
+
+@@ -1113,8 +1112,9 @@
+
+ /* remove kernel modules in inverse order */
+ for (i = 0; i < card->bindings; i++) {
+- for (j = dev[i]->modules-1; j >= 0; j--)
++ for (j = dev[i]->modules-1; j >= 0; j--) {
+ remove_module(dev[i]->module[j]);
++ }
+ free_device(dev[i]);
+ }
+ /* Remove any MTD's bound to this socket */