extcon: axp288: Replace open coded acpi_dev_put()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Jan 2023 20:29:19 +0000 (22:29 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 29 May 2023 14:30:15 +0000 (23:30 +0900)
Instead of calling put_device(&adev->dev) where adev is a pointer
to an ACPI device, use specific call, i.e. acpi_dev_put().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-axp288.c

index 180be768c2157b6c79f5718ef411d498ed2ffc34..a703a8315634df6aea13e1c43e53d3f643925638 100644 (file)
@@ -393,7 +393,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
                adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1);
                if (adev) {
                        info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev));
-                       put_device(&adev->dev);
+                       acpi_dev_put(adev);
                        if (IS_ERR(info->id_extcon))
                                return PTR_ERR(info->id_extcon);