lkml.org 
[lkml]   [2013]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 19/27] PCI, x86: Use for_each_pci_resource() with mrst
    Date
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Cc: x86@kernel.org
    Cc: Huang Ying <ying.huang@intel.com>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    ---
    arch/x86/pci/mrst.c | 7 ++++---
    1 file changed, 4 insertions(+), 3 deletions(-)

    diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
    index 6eb18c4..884ea69 100644
    --- a/arch/x86/pci/mrst.c
    +++ b/arch/x86/pci/mrst.c
    @@ -280,6 +280,7 @@ static void pci_fixed_bar_fixup(struct pci_dev *dev)
    unsigned long offset;
    u32 size;
    int i;
    + struct resource *res;

    if (!pci_soc_mode)
    return;
    @@ -294,10 +295,10 @@ static void pci_fixed_bar_fixup(struct pci_dev *dev)
    PCI_DEVFN(2, 2) == dev->devfn)
    return;

    - for (i = 0; i < PCI_ROM_RESOURCE; i++) {
    + for_each_pci_resource(dev, res, i, PCI_STD_RES) {
    pci_read_config_dword(dev, offset + 8 + (i * 4), &size);
    - dev->resource[i].end = dev->resource[i].start + size - 1;
    - dev->resource[i].flags |= IORESOURCE_PCI_FIXED;
    + res->end = res->start + size - 1;
    + res->flags |= IORESOURCE_PCI_FIXED;
    }
    }
    DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixed_bar_fixup);
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2013-03-14 01:01    [W:2.704 / U:0.648 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site