Commit ff8f5992 authored by Russell King's avatar Russell King

[PCMCIA] Remove original module use accounting in register_callback.

parent 091da9b1
...@@ -233,14 +233,7 @@ static const lookup_t service_table[] = { ...@@ -233,14 +233,7 @@ static const lookup_t service_table[] = {
static int register_callback(struct pcmcia_socket *s, void (*handler)(void *, unsigned int), void * info) static int register_callback(struct pcmcia_socket *s, void (*handler)(void *, unsigned int), void * info)
{ {
int error; return s->ss_entry->register_callback(s, handler, info);
if (handler && !try_module_get(s->owner))
return -ENODEV;
error = s->ss_entry->register_callback(s, handler, info);
if (!handler)
module_put(s->owner);
return error;
} }
static int get_socket_status(struct pcmcia_socket *s, int *val) static int get_socket_status(struct pcmcia_socket *s, int *val)
......
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