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: <20240122030238.29437-4-raag.jadav@intel.com>
Date: Mon, 22 Jan 2024 08:32:38 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: u.kleine-koenig@...gutronix.de,
	jarkko.nikula@...ux.intel.com,
	mika.westerberg@...ux.intel.com,
	andriy.shevchenko@...ux.intel.com,
	lakshmi.sowjanya.d@...el.com
Cc: linux-pwm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v1 3/3] pwm: dwc: use to_pci_dev() helper

Use to_pci_dev() helper to get pci device reference.

Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
 drivers/pwm/pwm-dwc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c
index 8f8035b047c1..f5fcea4e69e2 100644
--- a/drivers/pwm/pwm-dwc.c
+++ b/drivers/pwm/pwm-dwc.c
@@ -100,7 +100,7 @@ static void dwc_pwm_remove(struct pci_dev *pci)
 
 static int dwc_pwm_suspend(struct device *dev)
 {
-	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
 	struct dwc_pwm *dwc = pci_get_drvdata(pdev);
 	int i;
 
@@ -120,7 +120,7 @@ static int dwc_pwm_suspend(struct device *dev)
 
 static int dwc_pwm_resume(struct device *dev)
 {
-	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
 	struct dwc_pwm *dwc = pci_get_drvdata(pdev);
 	int i;
 
-- 
2.35.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ