Commit ae364fd9 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

nouveau: ACPI: Use the ACPI_COMPANION() macro directly

The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION()
macro and the ACPI handle produced by the former comes from the
ACPI device object produced by the latter, so it is way more
straightforward to evaluate the latter directly instead of passing
the handle produced by the former to acpi_bus_get_device().

Modify nouveau_acpi_edid() accordingly (no intentional functional
impact).
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 3906fe9b
...@@ -364,7 +364,6 @@ void * ...@@ -364,7 +364,6 @@ void *
nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
{ {
struct acpi_device *acpidev; struct acpi_device *acpidev;
acpi_handle handle;
int type, ret; int type, ret;
void *edid; void *edid;
...@@ -377,12 +376,8 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) ...@@ -377,12 +376,8 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)
return NULL; return NULL;
} }
handle = ACPI_HANDLE(dev->dev); acpidev = ACPI_COMPANION(dev->dev);
if (!handle) if (!acpidev)
return NULL;
ret = acpi_bus_get_device(handle, &acpidev);
if (ret)
return NULL; return NULL;
ret = acpi_video_get_edid(acpidev, type, -1, &edid); ret = acpi_video_get_edid(acpidev, type, -1, &edid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment