Skip to contentSkip to conversation

HID: intel-ish-hid: Use dev_get_drvdata where possible

PATCH New Chuhong Yuan 1 participant 1 message Jul 23, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: intel-ish-hid: Use dev_get_drvdata where possible

Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

---
 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/hid/intel-ish-hid/ipc/pci-ish.c +1 -2
index aa80b4d3b740..7047c14516c9 100644
@@ -204,8 +204,7 @@ static struct device __maybe_unused *ish_resume_device;
  */
 static void __maybe_unused ish_resume_handler(struct work_struct *work)
 {
-	struct pci_dev *pdev = to_pci_dev(ish_resume_device);
-	struct ishtp_device *dev = pci_get_drvdata(pdev);
+	struct ishtp_device *dev = dev_get_drvdata(ish_resume_device);
 	uint32_t fwsts;
 	int ret;
 
Signature · 1 line
2.20.1