summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/protocol.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-10-13 19:10:24 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-10-14 12:06:00 -0700
commit78033844daa64c83d91dca73eb1fbcae56c42fac (patch)
tree8af0a9a94e42218a0156795d8977b1e0ef59edbc /drivers/staging/greybus/protocol.h
parent0b1118a9efa9a00e449158bb7bb74249dc92c888 (diff)
greybus: protocol: warn on bad deregistration
A protocol should be deregistered exactly once when the protocol module is being unloaded. This means that protocol deregister will never be called with active users as we take a module reference when looking up a protocol. Remove comment suggesting that we could one day forcefully stop a user of a protocol, and issue a big warning if a protocol is deregistered more than once or at some other time than during module unload (e.g. with active users). Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/protocol.h')
-rw-r--r--drivers/staging/greybus/protocol.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/protocol.h b/drivers/staging/greybus/protocol.h
index d856885a89e1..2e0f4d667897 100644
--- a/drivers/staging/greybus/protocol.h
+++ b/drivers/staging/greybus/protocol.h
@@ -46,7 +46,7 @@ struct gb_protocol {
};
int __gb_protocol_register(struct gb_protocol *protocol, struct module *module);
-int gb_protocol_deregister(struct gb_protocol *protocol);
+void gb_protocol_deregister(struct gb_protocol *protocol);
#define gb_protocol_register(protocol) \
__gb_protocol_register(protocol, THIS_MODULE)