Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd: Copy entire structure in amdgpu_acpi_get_backlight_caps()

As new members are introduced to the structure copying the entire
structure will help avoid missing them.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Link: https://lore.kernel.org/r/20250228185145.186319-2-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mario Limonciello and committed by
Alex Deucher
1c79b5fc 43e88e20

+1 -5
+1 -5
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
··· 1277 1277 { 1278 1278 struct amdgpu_atif *atif = &amdgpu_acpi_priv.atif; 1279 1279 1280 - caps->caps_valid = atif->backlight_caps.caps_valid; 1281 - caps->min_input_signal = atif->backlight_caps.min_input_signal; 1282 - caps->max_input_signal = atif->backlight_caps.max_input_signal; 1283 - caps->ac_level = atif->backlight_caps.ac_level; 1284 - caps->dc_level = atif->backlight_caps.dc_level; 1280 + memcpy(caps, &atif->backlight_caps, sizeof(*caps)); 1285 1281 } 1286 1282 1287 1283 /**