From: Hidetoshi Seto Date: Thu, 6 Aug 2009 02:32:04 +0000 (+0900) Subject: PCI MSI: Use list_first_entry() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9cc8d54815bd5b7c4b516e6be92f036bbcdd8bad;p=openwrt%2Fstaging%2Fblogic.git PCI MSI: Use list_first_entry() use list_first_entry() instead of list_entry(). Reviewed-by: Matthew Wilcox Signed-off-by: Hidetoshi Seto Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index a7b72f633d07..bdd2ca9df41f 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -324,7 +324,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev) if (!dev->msix_enabled) return; BUG_ON(list_empty(&dev->msi_list)); - entry = list_entry(dev->msi_list.next, struct msi_desc, list); + entry = list_first_entry(&dev->msi_list, struct msi_desc, list); pos = entry->msi_attrib.pos; pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control);