Defensive IRQ allocation procedure.
Am I correct in believing that an RTDM driver can safely call request_irq() from its non-realtime ioctl_nr() callback? I want to do this to verify that a non-realtime driver isn't using the same IRQ as my realtime device, before I attempt to use it in my RTDM driver, and as well as to prevent any non-realtime drivers from allocating that IRQ once I have started to use it. I can't do this at module initialization time, because I don't know which of our identical digital I/O boards is connected to what, until I perform I/O to them, and not all of them need interrupts.
Thanks,
Martin
Quoted 9 lines · Martin Shepherd
Am I correct in believing that an RTDM driver can safely call
request_irq()from its non-realtimeioctl_nr()callback? I want to do this to verify that a non-realtime driver isn't using the same IRQ as my realtime device, before I attempt to use it in my RTDM driver, and as well as to prevent any non-realtime drivers from allocating that IRQ once I have started to use it. I can't do this at module initialization time, because I don't know which of our identical digital I/O boards is connected to what, until I perform I/O to them, and not all of them need interrupts.
Yes, this should work. Note however, that request_irq will work even if there is another irq handler registered with IRQF_SHARED, and you pass IRQF_SHARED too.
Signature · 1 line
Gilles.