speedtch speedtch.c,1.30,1.31
Duncan Sands
duncan at infradead.org
Thu Oct 7 03:15:32 EDT 2004
Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv9872
Modified Files:
speedtch.c
Log Message:
Using a kernel thread means we need a try_module_get.
Index: speedtch.c
===================================================================
RCS file: /home/cvs/speedtch/speedtch.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- speedtch.c 6 Oct 2004 23:47:40 -0000 1.30
+++ speedtch.c 7 Oct 2004 07:15:29 -0000 1.31
@@ -637,11 +637,14 @@
}
release_firmware(fw1);
}
+
/* In case we failed, set state back to NO_FIRMWARE so that
another later attempt may work. Otherwise, we never actually
manage to recover if, for example, the firmware is on /usr and
we look for it too early. */
speedtch_got_firmware(instance, 0);
+
+ module_put(THIS_MODULE);
udsl_put_instance(&instance->u);
return 0;
}
@@ -665,9 +668,10 @@
instance->u.status = UDSL_LOADING_FIRMWARE;
up(&instance->u.serialize);
+#ifdef USE_FW_LOADER
udsl_get_instance(&instance->u);
+ try_module_get(THIS_MODULE);
-#ifdef USE_FW_LOADER
ret = kernel_thread(speedtch_load_firmware, instance,
CLONE_FS | CLONE_FILES);
@@ -676,10 +680,12 @@
dbg("speedtch_firmware_start: kernel_thread failed (%d)!", ret);
+ module_put(THIS_MODULE);
+ udsl_put_instance(&instance->u);
/* Just pretend it never happened... hope modem_run happens */
#endif /* USE_FW_LOADER */
+
speedtch_got_firmware(instance, 0);
- udsl_put_instance(&instance->u);
}
static int speedtch_firmware_wait(struct udsl_instance_data *instance)
More information about the Usbatm-commits
mailing list