lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559577023-558-24-git-send-email-suzuki.poulose@arm.com>
Date:   Mon,  3 Jun 2019 16:49:49 +0100
From:   Suzuki K Poulose <suzuki.poulose@....com>
To:     linux-kernel@...r.kernel.org
Cc:     gregkh@...uxfoundation.org, rafael@...nel.org,
        suzuki.poulose@....com, Mark Brown <broonie@...nel.org>,
        linux-spi@...r.kernel.org
Subject: [RFC PATCH 23/57] drivers: spi: Use bus_find_device_by_acpi_dev match helper

Switch to the generic helper bus_find_device_by_acpi_dev.

Cc: Mark Brown <broonie@...nel.org>
Cc: linux-spi@...r.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
---
 drivers/spi/spi.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ecdd602..5224ded 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3634,11 +3634,6 @@ static int spi_acpi_controller_match(struct device *dev, const void *data)
 	return ACPI_COMPANION(dev->parent) == data;
 }
 
-static int spi_acpi_device_match(struct device *dev, void *data)
-{
-	return ACPI_COMPANION(dev) == data;
-}
-
 static struct spi_controller *acpi_spi_find_controller_by_adev(struct acpi_device *adev)
 {
 	struct device *dev;
@@ -3658,8 +3653,7 @@ static struct spi_device *acpi_spi_find_device_by_adev(struct acpi_device *adev)
 {
 	struct device *dev;
 
-	dev = bus_find_device(&spi_bus_type, NULL, adev, spi_acpi_device_match);
-
+	dev = bus_find_device(&spi_bus_type, NULL, adev, device_match_acpi_dev);
 	return dev ? to_spi_device(dev) : NULL;
 }
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ