drm/radeon: make -fstrict-flex-arrays=3 happy
authorjsg <jsg@openbsd.org>
Mon, 29 Apr 2024 06:31:57 +0000 (06:31 +0000)
committerjsg <jsg@openbsd.org>
Mon, 29 Apr 2024 06:31:57 +0000 (06:31 +0000)
From Alex Deucher
259486b5bdc63f648634c30b8284be29834a4125 in linux-6.6.y/6.6.29
0ba753bc7e79e49556e81b0d09b2de1aa558553b in mainline linux

sys/dev/pci/drm/radeon/radeon_atombios.c

index e5cf95a..092279f 100644 (file)
@@ -926,8 +926,12 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
                max_device = ATOM_MAX_SUPPORTED_DEVICE_INFO;
 
        for (i = 0; i < max_device; i++) {
-               ATOM_CONNECTOR_INFO_I2C ci =
-                   supported_devices->info.asConnInfo[i];
+               ATOM_CONNECTOR_INFO_I2C ci;
+
+               if (frev > 1)
+                       ci = supported_devices->info_2d1.asConnInfo[i];
+               else
+                       ci = supported_devices->info.asConnInfo[i];
 
                bios_connectors[i].valid = false;