Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=467c442f092e22acf86a3b4ad4863d097d7257da Commit: 467c442f092e22acf86a3b4ad4863d097d7257da Parent: a2302c68d923537436b1114aa207787c1a31bd50 Author: Akinobu Mita <[EMAIL PROTECTED]> AuthorDate: Mon Oct 30 13:07:58 2006 -0800 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Fri Dec 1 14:36:58 2006 -0800
acpiphp: fix use of list_for_each macro This patch fixes invalid usage of list_for_each() list_for_each (node, &bridge_list) { bridge = (struct acpiphp_bridge *)node; ... } This code works while the member of list node is located at the head of struct acpiphp_bridge. Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]> Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/pci/hotplug/acpiphp_glue.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 16167b0..0b9d0db 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -1693,14 +1693,10 @@ void __exit acpiphp_glue_exit(void) */ int __init acpiphp_get_num_slots(void) { - struct list_head *node; struct acpiphp_bridge *bridge; - int num_slots; - - num_slots = 0; + int num_slots = 0; - list_for_each (node, &bridge_list) { - bridge = (struct acpiphp_bridge *)node; + list_for_each_entry (bridge, &bridge_list, list) { dbg("Bus %04x:%02x has %d slot%s\n", pci_domain_nr(bridge->pci_bus), bridge->pci_bus->number, bridge->nr_slots, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html