2010-03-26 16:29:20 +02:00
|
|
|
--- a/cardmgr/cardmgr.c
|
|
|
|
+++ b/cardmgr/cardmgr.c
|
|
|
|
@@ -739,10 +739,7 @@ static int try_insmod(char *mod, char *o
|
2006-12-05 23:34:56 +02:00
|
|
|
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);
|
2010-03-26 16:29:20 +02:00
|
|
|
@@ -808,11 +805,13 @@ static void install_module(char *mod, ch
|
2006-12-05 23:34:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-03-26 16:29:20 +02:00
|
|
|
@@ -1113,8 +1112,9 @@ static void do_remove(int sn)
|
2006-12-05 23:34:56 +02:00
|
|
|
|
|
|
|
/* 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 */
|