s390x/pci: refactor s390_pci_find_dev_by_fh
commit06a96dae11a70f3c519a706639e200a635a2cc55
authorYi Min Zhao <zyimin@linux.vnet.ibm.com>
Thu, 12 May 2016 06:27:25 +0000 (12 14:27 +0800)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 11 Jul 2016 07:48:05 +0000 (11 09:48 +0200)
tree5520790bcb58454902c3907d07f0dc4291e58402
parentc188e30315dc44cf428f2008df4ea2a9788ac8df
s390x/pci: refactor s390_pci_find_dev_by_fh

Because this function is called very frequently, we should use a more
effective way to find the zpci device. So we use the FH's index to get
the device directly.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-pci-bus.c