• Bjorn Helgaas's avatar
    PNP: dont sort by type in /sys/.../resources · f61ed7e3
    Bjorn Helgaas authored
    Rather than stepping through all IO resources, then stepping through
    all MMIO resources, etc., we can just iterate over the resource list
    once directly.
    
    This can change the order in /sys, e.g.,
    
        # cat /sys/devices/pnp0/00:07/resources     # OLD
        state = active
        io 0x3f8-0x3ff
        irq 4
    
        # cat /sys/devices/pnp0/00:07/resources     # NEW
        state = active
        irq 4
        io 0x3f8-0x3ff
    
    The old code artificially sorted resources by type; the new code
    just lists them in the order we read them from the ISAPNP hardware
    or the BIOS.
    Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
    f61ed7e3
interface.c 10.5 KB