Skip to content

Commit

Permalink
Merge branch 'pci/deprecate-get-bus-and-slot'
Browse files Browse the repository at this point in the history
  - remove last user of pci_get_bus_and_slot() and the function itself
    (Sinan Kaya)

* pci/deprecate-get-bus-and-slot:
  PCI: Remove pci_get_bus_and_slot() function
  drm/i915: Deprecate pci_get_bus_and_slot()
  • Loading branch information
bjorn-helgaas authored and Bjorn Helgaas committed Apr 4, 2018
2 parents 09baca9 + 5cf0c37 commit db7a726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/i915/i915_drv.c
Expand Up @@ -434,7 +434,10 @@ static int i915_getparam(struct drm_device *dev, void *data,


static int i915_get_bridge_dev(struct drm_i915_private *dev_priv) static int i915_get_bridge_dev(struct drm_i915_private *dev_priv)
{ {
dev_priv->bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)); int domain = pci_domain_nr(dev_priv->drm.pdev->bus);

dev_priv->bridge_dev =
pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 0));
if (!dev_priv->bridge_dev) { if (!dev_priv->bridge_dev) {
DRM_ERROR("bridge device not found\n"); DRM_ERROR("bridge device not found\n");
return -1; return -1;
Expand Down
8 changes: 0 additions & 8 deletions include/linux/pci.h
Expand Up @@ -949,11 +949,6 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus,
unsigned int devfn); unsigned int devfn);
static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
unsigned int devfn)
{
return pci_get_domain_bus_and_slot(0, bus, devfn);
}
struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from);
int pci_dev_present(const struct pci_device_id *ids); int pci_dev_present(const struct pci_device_id *ids);


Expand Down Expand Up @@ -1661,9 +1656,6 @@ static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
static inline struct pci_dev *pci_get_slot(struct pci_bus *bus, static inline struct pci_dev *pci_get_slot(struct pci_bus *bus,
unsigned int devfn) unsigned int devfn)
{ return NULL; } { return NULL; }
static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
unsigned int devfn)
{ return NULL; }
static inline struct pci_dev *pci_get_domain_bus_and_slot(int domain, static inline struct pci_dev *pci_get_domain_bus_and_slot(int domain,
unsigned int bus, unsigned int devfn) unsigned int bus, unsigned int devfn)
{ return NULL; } { return NULL; }
Expand Down

0 comments on commit db7a726

Please sign in to comment.