[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230123171006.58274-3-andriy.shevchenko@linux.intel.com>
Date: Mon, 23 Jan 2023 19:10:06 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
acpica-devel@...ts.linuxfoundation.org
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Robert Moore <robert.moore@...el.com>
Subject: [PATCH v1 3/3] ACPI: video: Switch to use acpi_get_first_match_physical_node()
Refactor the code to use acpi_get_first_match_physical_node(),
which is currently open coded.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/acpi/video_detect.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 0ccde0d4c527..b23773347e67 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -112,16 +112,10 @@ static bool nvidia_wmi_ec_supported(void)
static bool apple_gmux_backlight_present(void)
{
- struct acpi_device *adev;
struct device *dev;
bool ret;
- adev = acpi_dev_get_first_match_dev(GMUX_ACPI_HID, NULL, -1);
- if (!adev)
- return false;
-
- dev = get_device(acpi_get_first_physical_node(adev));
- acpi_dev_put(adev);
+ dev = acpi_get_first_match_physical_node(GMUX_ACPI_HID, NULL, -1);
if (!dev)
return false;
--
2.39.0
Powered by blists - more mailing lists