Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151780065
D35064.id105720.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35064.id105720.diff
View Options
Index: sys/i386/bios/smapi.c
===================================================================
--- sys/i386/bios/smapi.c
+++ sys/i386/bios/smapi.c
@@ -278,30 +278,6 @@
return (0);
}
-static int
-smapi_modevent (module_t mod, int what, void *arg)
-{
- device_t * devs;
- int count;
- int i;
-
- switch (what) {
- case MOD_LOAD:
- break;
- case MOD_UNLOAD:
- devclass_get_devices(smapi_devclass, &devs, &count);
- for (i = 0; i < count; i++) {
- device_delete_child(device_get_parent(devs[i]), devs[i]);
- }
- free(devs, M_TEMP);
- break;
- default:
- break;
- }
-
- return (0);
-}
-
static device_method_t smapi_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, smapi_identify),
@@ -317,5 +293,30 @@
sizeof(struct smapi_softc),
};
+static int
+smapi_modevent (module_t mod, int what, void *arg)
+{
+ device_t * devs;
+ int count;
+ int i;
+
+ switch (what) {
+ case MOD_LOAD:
+ break;
+ case MOD_UNLOAD:
+ devclass_get_devices(devclass_find(smapi_driver.name), &devs,
+ &count);
+ for (i = 0; i < count; i++) {
+ device_delete_child(device_get_parent(devs[i]), devs[i]);
+ }
+ free(devs, M_TEMP);
+ break;
+ default:
+ break;
+ }
+
+ return (0);
+}
+
DRIVER_MODULE(smapi, nexus, smapi_driver, smapi_devclass, smapi_modevent, 0);
MODULE_VERSION(smapi, 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 3:20 PM (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31296758
Default Alt Text
D35064.id105720.diff (1 KB)
Attached To
Mode
D35064: smapi: Use devclass_find to lookup smapi devclass in unload handler.
Attached
Detach File
Event Timeline
Log In to Comment