Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414704

[PATCH 2/3] PCI: Use device_match_always()

From Thierry Reding <thierry.reding@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] PCI: Use device_match_always()
Date 2016-06-06 09:40 +0200
Message-ID <rGXiG-1OJ-7@gated-at.bofh.it> (permalink)
References <rGXiG-1OJ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Thierry Reding <treding@nvidia.com>

There is now a common implementation for a match function that will
always match, so the PCI-specific implementation can be removed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/pci/probe.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 8e3ef720997d..3db06d8d6497 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -62,11 +62,6 @@ static struct resource *get_pci_domain_busn_res(int domain_nr)
 	return &r->res;
 }
 
-static int find_anything(struct device *dev, void *data)
-{
-	return 1;
-}
-
 /*
  * Some device drivers need know if pci is initiated.
  * Basically, we think pci is not initiated when there
@@ -77,7 +72,7 @@ int no_pci_devices(void)
 	struct device *dev;
 	int no_devices;
 
-	dev = bus_find_device(&pci_bus_type, NULL, NULL, find_anything);
+	dev = bus_find_device(&pci_bus_type, NULL, NULL, device_match_always);
 	no_devices = (dev == NULL);
 	put_device(dev);
 	return no_devices;
-- 
2.8.3

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] PCI: Use device_match_always() Thierry Reding <thierry.reding@gmail.com> - 2016-06-06 09:40 +0200
  Re: [PATCH 2/3] PCI: Use device_match_always() Bjorn Helgaas <helgaas@kernel.org> - 2016-06-10 18:20 +0200
    Re: [PATCH 2/3] PCI: Use device_match_always() Thierry Reding <thierry.reding@gmail.com> - 2016-06-10 18:40 +0200

csiph-web