]> err.no Git - linux-2.6/commit
PNP: dont sort by type in /sys/.../resources
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Fri, 27 Jun 2008 22:57:00 +0000 (16:57 -0600)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:06 +0000 (23:27 +0200)
commitf61ed7e32d2d6a0a8c3c101da513ccedd542e14d
tree6a397ad9c74e3359f6c7f40857ca424ca701b027
parent25d39c39d82d062f4be685146abd054a3bafdf12
PNP: dont sort by type in /sys/.../resources

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: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/pnp/interface.c