/* The central event handler. Send_event() sends an event to the 16-bit subsystem, which then calls the relevant device drivers. Parse_events() interprets the event bits from a card status change report. Do_shutdown() handles the high priority stuff associated with a card removal.  */
static int send_event(struct pcmcia_socket *s, event_t event, int priority)
/* The central event handler. Send_event() sends an event to the 16-bit subsystem, which then calls the relevant device drivers. Parse_events() interprets the event bits from a card status change report. Do_shutdown() handles the high priority stuff associated with a card removal.  */
static int send_event(struct pcmcia_socket *s, event_t event, int priority)
{
	int ret;
	if (s->state & SOCKET_CARDBUS)
		return 0;
	dev_dbg(&s->dev, "send_event(event %d, pri %d, callback 0x%p)\n",
	   event, priority, s->callback);
	if (!s->callback)
		return 0;
	if (!try_module_get(s->callback->owner))
		return 0;
	ret = s->callback->event(s, event, priority);
	module_put(s->callback->owner);
	return ret;
}