[PATCH 13/13] pcmcia: rework the irq_req_t typedef

Komuro komurojun-mbn at nifty.com
Fri Nov 13 19:33:14 EST 2009


Hi,

>link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;

IRQ_FIRST_SHARED is not used at all in the pcmcia-subsystem.
so it should be removed.


> Most of the irq_req_t typedef'd struct can be re-worked quite
> easily:
> 
> (1) IRQInfo2 was unused in any case, so drop it.
> 
> (2) IRQInfo1 was used write-only, so drop it.
> 
> (3) Instance (private data to be passed to the IRQ handler):
> 	Most PCMCIA drivers using pcmcia_request_irq() to actually
> 	register an IRQ handler set the "dev_id" to the same pointer
> 	as the "priv" pointer in struct pcmcia_device. Modify the two
> 	exceptions (ipwireless, ibmtr_cs) to also work this waym and
> 	set the IRQ handler's "dev_id" to p_dev->priv unconditionally.
> 
> (4) Handler is to be of type irq_handler_t.
> 
> (5) Handler != NULL already tells whether an IRQ handler is present.
> 	Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
> 	irq_req_t.Attributes.
> 

Best Regards
Komuro



More information about the linux-pcmcia mailing list