On Wed, Aug 22, 2012 at 10:35 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: > On Wed, Aug 22, 2012 at 10:31 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: >> > keep the idx would make thing simple for referencing and converting. > > pci_dev_resource_n() would be wrapper to from idx to real resource pointer. > we just need to change &dev->resource[i] referencing to > pci_dev_resource_n(dev, i) instead. > > We did that before for irq_desc storage converting, and now we have > for_each_irq_desc(irq, desc) > > later for the resource allocation, I will change resource member from > struct resource resource[DEVICE_COUNT_RESOURCE]; > to > struct resource std_res[7]; > struct resource *iov_res; > struct resource *bridge_res; > and allocate iov_res and bridge array as needed. > > anyway keep the overalll idx is good way to go and follow. > Like to suggest two versions that only handle idx... Thanks Yinghai
Attachment:
ram_pci_it_v4.patch
Description: Binary data
Attachment:
ram_pci_it_v4_x.patch
Description: Binary data