Commit 91f5fe70 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] remove GET_USE_COUNT

This is a left-over from the old modules code, Rusty stubbed it out
to always return 0.  Three scsi pcmcia driver check it for beeing non-NULL,
trying to work around their unload races.  I've added #warnings there
and stubbed out the GET_USE_COUNT so we can remove it from the core.
parent 76540ee0
......@@ -350,12 +350,15 @@ static void aha152x_release_cs(u_long arg)
DEBUG(0, "aha152x_release_cs(0x%p)\n", link);
#warning This doesn't protect you. You need some real fix for your races.
#if 0
if (GET_USE_COUNT(driver_template.module) != 0) {
DEBUG(1, "aha152x_cs: release postponed, "
"device still open\n");
link->state |= DEV_STALE_CONFIG;
return;
}
#endif
scsi_unregister_host(&driver_template);
link->dev = NULL;
......
......@@ -313,12 +313,15 @@ static void fdomain_release(u_long arg)
DEBUG(0, "fdomain_release(0x%p)\n", link);
#warning This doesn't protect you. You need some real fix for your races.
#if 0
if (GET_USE_COUNT(&__this_module) != 0) {
DEBUG(1, "fdomain_cs: release postponed, "
"device still open\n");
link->state |= DEV_STALE_CONFIG;
return;
}
#endif
scsi_unregister_host(&driver_template);
link->dev = NULL;
......
......@@ -329,11 +329,14 @@ static void qlogic_release(u_long arg)
DEBUG(0, "qlogic_release(0x%p)\n", link);
#warning This doesn't protect you. You need some real fix for your races.
#if 0
if (GET_USE_COUNT(&__this_module) != 0) {
DEBUG(0, "qlogic_cs: release postponed, device still open\n");
link->state |= DEV_STALE_CONFIG;
return;
}
#endif
scsi_unregister_host(&driver_template);
link->dev = NULL;
......
......@@ -437,8 +437,6 @@ static inline void __deprecated _MOD_INC_USE_COUNT(struct module *module)
#endif
}
#define EXPORT_NO_SYMBOLS
extern int module_dummy_usage;
#define GET_USE_COUNT(module) (module_dummy_usage)
#define MOD_IN_USE 0
#define __MODULE_STRING(x) __stringify(x)
......
......@@ -1514,7 +1514,3 @@ static int __init symbols_init(void)
}
__initcall(symbols_init);
/* Obsolete lvalue for broken code which asks about usage */
int module_dummy_usage = 1;
EXPORT_SYMBOL(module_dummy_usage);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment