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-23-git-send-email-suzuki.poulose@arm.com>
Date:   Mon,  3 Jun 2019 16:49:48 +0100
From:   Suzuki K Poulose <suzuki.poulose@....com>
To:     linux-kernel@...r.kernel.org
Cc:     gregkh@...uxfoundation.org, rafael@...nel.org,
        suzuki.poulose@....com,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Wolfram Sang <wsa@...-dreams.de>, linux-i2c@...r.kernel.org
Subject: [RFC PATCH 22/57] drivers: i2c: Use generic helper to match device by acpi_dev

Switch to the generic helper to match device by acpi_dev.

Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Wolfram Sang <wsa@...-dreams.de>
cc: linux-i2c@...r.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
---
 drivers/i2c/i2c-core-acpi.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index d840955..e28165b 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -328,11 +328,6 @@ static int i2c_acpi_find_match_adapter(struct device *dev, void *data)
 	return ACPI_HANDLE(dev) == (acpi_handle)data;
 }
 
-static int i2c_acpi_find_match_device(struct device *dev, void *data)
-{
-	return ACPI_COMPANION(dev) == data;
-}
-
 static struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
 {
 	struct device *dev;
@@ -346,8 +341,7 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
 {
 	struct device *dev;
 
-	dev = bus_find_device(&i2c_bus_type, NULL, adev,
-			      i2c_acpi_find_match_device);
+	dev = bus_find_device(&i2c_bus_type, NULL, adev, device_match_acpi_dev);
 	return dev ? i2c_verify_client(dev) : NULL;
 }
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ