[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191128125406.10417-5-info@metux.net>
Date: Thu, 28 Nov 2019 13:54:05 +0100
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: tim@...tersideup.com, james.morse@....com, rrichter@...vell.com,
jdelvare@...e.com, linux@...ck-us.net, miquel.raynal@...tlin.com,
richard@....at, vigneshr@...com, linux-crypto@...r.kernel.org,
linux-edac@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-pci@...r.kernel.org
Subject: [PATCH 5/6] char: hw_random: intel-rng: use pci_get_device_by_id()
Use the new pci_get_device_by_id() helper in order to reduce
a bit of boilerplate.
Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
---
drivers/char/hw_random/intel-rng.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index 290c880266bf..6b8d37a81166 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -335,8 +335,7 @@ static int __init mod_init(void)
struct intel_rng_hw *intel_rng_hw;
for (i = 0; !dev && pci_tbl[i].vendor; ++i)
- dev = pci_get_device(pci_tbl[i].vendor, pci_tbl[i].device,
- NULL);
+ dev = pci_get_device_by_id(&pci_tbl[i]);
if (!dev)
goto out; /* Device not found. */
--
2.11.0
Powered by blists - more mailing lists