This patch adds an IORESOURCE_IRQ_OPTIONAL flag for use whenassigning resources to a device. If the flag is set and we areunable to assign an IRQ to the device, we can leave the IRQdisabled but allow the overall resource allocation to succeed.

Some devices request an IRQ, but can run without an IRQ(possibly with degraded performance). This flag lets us runthe device without the IRQ instead of just leaving thedevice disabled.

I reimplemented this for two reasons: - to prepare for converting all resource options into a single linked list, as opposed to the per-resource-type lists we have now, and - to preserve the order and number of resource options.

In PNPBIOS and ACPI, we configure a device by giving firmware alist of resource assignments. It is important that this listhas exactly the same number of resources, in the same order,as the "template" list we got from the firmware in the firstplace.

The problem of a sound card being left disabled for want of anIRQ was reported by Uwe Bugla <uwe.bugla@gmx.de>.