From 6fe56a9ff8a854dd27ba9bfe4f52d1c2cd0b6b8a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 20 Feb 2003 21:44:13 -0800 Subject: [PATCH] try_module_get(THIS_MODULE) is bogus In most cases the fix is to add an struct module * member to the operations vector instead and manipulate the refcounts in the callers context. For the ALSA cases it was completly superflous (when will people get it that using an exported symbol will make it's module unloadable?..) --- include/linux/ipmi_smi.h | 11 ++--------- include/linux/sunrpc/auth.h | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'include/linux') diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 5916dea748e3..f18187b00c05 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -78,6 +78,8 @@ struct ipmi_smi_msg struct ipmi_smi_handlers { + struct module *owner; + /* Called to enqueue an SMI message to be sent. This operation is not allowed to fail. If an error occurs, it should report back the error in a received message. It may @@ -93,15 +95,6 @@ struct ipmi_smi_handlers events from the BMC we are attached to. */ void (*request_events)(void *send_info); - /* Called when someone is using the interface, so the module can - adjust it's use count. Return zero if successful, or an - errno if not. */ - int (*new_user)(void *send_info); - - /* Called when someone is no longer using the interface, so the - module can adjust it's use count. */ - void (*user_left)(void *send_info); - /* Called when the interface should go into "run to completion" mode. If this call sets the value to true, the interface should make sure that all messages are flushed diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index a1ed52af2895..5fd520bb6c47 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -84,6 +84,7 @@ struct rpc_auth { * Client authentication ops */ struct rpc_authops { + struct module *owner; rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ #ifdef RPC_DEBUG char * au_name; -- cgit v1.2.3