Skip to content

Commit 184fa76

Browse files
andy-shevgregkh
authored andcommitted
usb: typec: intel_pmc_mux: Put ACPI device using acpi_dev_put()
For ACPI devices we have a symmetric API to put them, so use it in the driver. Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 843fabd commit 184fa76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,12 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc)
582582
acpi_dev_free_resource_list(&resource_list);
583583

584584
if (!pmc->iom_base) {
585-
put_device(&adev->dev);
585+
acpi_dev_put(adev);
586586
return -ENOMEM;
587587
}
588588

589589
if (IS_ERR(pmc->iom_base)) {
590-
put_device(&adev->dev);
590+
acpi_dev_put(adev);
591591
return PTR_ERR(pmc->iom_base);
592592
}
593593

@@ -658,7 +658,7 @@ static int pmc_usb_probe(struct platform_device *pdev)
658658
usb_role_switch_unregister(pmc->port[i].usb_sw);
659659
}
660660

661-
put_device(&pmc->iom_adev->dev);
661+
acpi_dev_put(pmc->iom_adev);
662662

663663
return ret;
664664
}
@@ -674,7 +674,7 @@ static int pmc_usb_remove(struct platform_device *pdev)
674674
usb_role_switch_unregister(pmc->port[i].usb_sw);
675675
}
676676

677-
put_device(&pmc->iom_adev->dev);
677+
acpi_dev_put(pmc->iom_adev);
678678

679679
return 0;
680680
}

0 commit comments

Comments
 (0)