There is actually not a lot you need. The current behaviour is correct.
> Isn't this worth "breaking" the non-working interrupt-sharing-by-handler-
> switching ?
Why should you break it ?
IFF a device is using the IRQ you can't get to use it. All that is needed
to handle the PnP case therefore is
reserve_irq(irqnum)
unreserve_irq(irqnum)
and devices can mark that even if they aren't using the irq currently. Non
PnP devices can take note of that and will collide as before and work
as before. PnP devices will keep clear of those assignments.
Since reserve/unreserve_irq look something like
int irq_reserve_count[NUM_IRQS];
extern __inline__ void reserve_irq(int n){irq_reserve_count[n]++;}
its not serious code to add either. I'll take a look this weekend
Alan