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]
Message-ID: <20231110182304.3894319-2-andriy.shevchenko@linux.intel.com>
Date:   Fri, 10 Nov 2023 20:11:21 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Mario Limonciello <mario.limonciello@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Wolfram Sang <wsa@...nel.org>, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Jan Dabros <jsd@...ihalf.com>,
        Andi Shyti <andi.shyti@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Hans de Goede <hdegoede@...hat.com>
Subject: [PATCH v3 01/25] i2c: designware: Delete adapter before disabling in i2c_dw_pci_remove()

Make i2c_dw_pci_remove() to be aligned with dw_i2c_plat_remove() on
the sequence of the ceasing I²C operations.

Fixes: 18dbdda89f5c ("i2c-designware: Add runtime power management support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 61d7a27aa070..35d35d7c8e23 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -354,11 +354,13 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev)
 {
 	struct dw_i2c_dev *dev = pci_get_drvdata(pdev);
 
+	i2c_del_adapter(&dev->adapter);
+
 	dev->disable(dev);
+
 	pm_runtime_forbid(&pdev->dev);
 	pm_runtime_get_noresume(&pdev->dev);
 
-	i2c_del_adapter(&dev->adapter);
 	devm_free_irq(&pdev->dev, dev->irq, dev);
 	pci_free_irq_vectors(pdev);
 }
-- 
2.43.0.rc1.1.gbec44491f096

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ