[package] add kmod-swconfig and kmod-swich-ip175c
[openwrt.git] / package / pcmcia-cs / patches / 003-cardmgr_c.patch
1 --- a/cardmgr/cardmgr.c
2 +++ b/cardmgr/cardmgr.c
3 @@ -739,10 +739,7 @@ static int try_insmod(char *mod, char *o
4 int ret;
5
6 strcpy(cmd, "insmod ");
7 - if (strchr(mod, '/') != NULL)
8 - sprintf(cmd+7, "%s/%s.o", modpath, mod);
9 - else
10 - sprintf(cmd+7, "%s/pcmcia/%s.o", modpath, mod);
11 + sprintf(cmd+7, "%s/%s.o", modpath, mod);
12 if (access(cmd+7, R_OK) != 0) {
13 syslog(LOG_NOTICE, "module %s not available", cmd+7);
14 free(cmd);
15 @@ -808,11 +805,13 @@ static void install_module(char *mod, ch
16 }
17
18 if (do_modprobe) {
19 - if (try_modprobe(mod, opts) != 0)
20 + if (try_modprobe(mod, opts) != 0) {
21 try_insmod(mod, opts);
22 + }
23 } else {
24 - if (try_insmod(mod, opts) != 0)
25 + if (try_insmod(mod, opts) != 0) {
26 try_modprobe(mod, opts);
27 + }
28 }
29 }
30
31 @@ -1113,8 +1112,9 @@ static void do_remove(int sn)
32
33 /* remove kernel modules in inverse order */
34 for (i = 0; i < card->bindings; i++) {
35 - for (j = dev[i]->modules-1; j >= 0; j--)
36 + for (j = dev[i]->modules-1; j >= 0; j--) {
37 remove_module(dev[i]->module[j]);
38 + }
39 free_device(dev[i]);
40 }
41 /* Remove any MTD's bound to this socket */
This page took 0.045664 seconds and 5 git commands to generate.