1 --- a/cardmgr/cardmgr.c
2 +++ b/cardmgr/cardmgr.c
3 @@ -739,10 +739,7 @@ static int try_insmod(char *mod, char *o
6 strcpy(cmd, "insmod ");
7 - if (strchr(mod, '/') != NULL)
8 - sprintf(cmd+7, "%s/%s.o", modpath, mod);
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);
15 @@ -808,11 +805,13 @@ static void install_module(char *mod, ch
19 - if (try_modprobe(mod, opts) != 0)
20 + if (try_modprobe(mod, opts) != 0) {
21 try_insmod(mod, opts);
24 - if (try_insmod(mod, opts) != 0)
25 + if (try_insmod(mod, opts) != 0) {
26 try_modprobe(mod, opts);
31 @@ -1113,8 +1112,9 @@ static void do_remove(int sn)
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]);
41 /* Remove any MTD's bound to this socket */