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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Sep 2016 21:05:29 +0100
From:   <jim_baxter@...tor.com>
To:     <linux-i2c@...r.kernel.org>
CC:     Peter Korsgaard <peter.korsgaard@...co.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Peter Rosin <peda@...ntia.se>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v1 2/2] i2c-mux-gpio: call i2c_add_reparented_mux_adapter

From: Joshua Frkuska <joshua_frkuska@...tor.com>

This reparents the adapter created in i2c-mux to this module for
module unloading and chaining purposes.

Signed-off-by: Joshua Frkuska <joshua_frkuska@...tor.com>
Signed-off-by: Jim Baxter <jim_baxter@...tor.com>
---
 drivers/i2c/muxes/i2c-mux-gpio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index e5cf26e..9f92535 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -234,7 +234,11 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
 		u32 nr = mux->data.base_nr ? (mux->data.base_nr + i) : 0;
 		unsigned int class = mux->data.classes ? mux->data.classes[i] : 0;
 
-		ret = i2c_mux_add_adapter(muxc, nr, mux->data.values[i], class);
+		ret = i2c_mux_add_reparented_adapter(THIS_MODULE,
+						     muxc,
+						     nr,
+						     mux->data.values[i],
+						     class);
 		if (ret) {
 			dev_err(&pdev->dev, "Failed to add adapter %d\n", i);
 			goto add_adapter_failed;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ