dm: pci: Add a function to get the controller for a bus
authorSimon Glass <sjg@chromium.org>
Fri, 20 Nov 2015 03:27:00 +0000 (20:27 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 1 Dec 2015 13:26:36 +0000 (06:26 -0700)
commit9f60fb0db4b70c65760cb1799b76de1c9b71644d
tree9c8f9d5815a9a2bb315b683d87fd446b2dbfc689
parent9289db6c60bc9caa285fc6459db9236d92ba94f6
dm: pci: Add a function to get the controller for a bus

A PCI bus may be a bridge device where the controller is the bridge's
parent. Add a function to return the controller device, given a PCI device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
drivers/pci/pci-uclass.c
include/pci.h