Skip to content

Commit 3ddd396

Browse files
committed
drm/amd/powerplay: Use designated initializers
The randstruct plugin requires designated initializers for structures that are entirely function pointers. Cc: Christian König <[email protected]> Cc: Eric Huang <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent 2a9d6d2 commit 3ddd396

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -709,17 +709,17 @@ static int tf_vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr,
709709

710710
static struct phm_master_table_item
711711
vega10_thermal_start_thermal_controller_master_list[] = {
712-
{NULL, tf_vega10_thermal_initialize},
713-
{NULL, tf_vega10_thermal_set_temperature_range},
714-
{NULL, tf_vega10_thermal_enable_alert},
712+
{ .tableFunction = tf_vega10_thermal_initialize },
713+
{ .tableFunction = tf_vega10_thermal_set_temperature_range },
714+
{ .tableFunction = tf_vega10_thermal_enable_alert },
715715
/* We should restrict performance levels to low before we halt the SMC.
716716
* On the other hand we are still in boot state when we do this
717717
* so it would be pointless.
718718
* If this assumption changes we have to revisit this table.
719719
*/
720-
{NULL, tf_vega10_thermal_setup_fan_table},
721-
{NULL, tf_vega10_thermal_start_smc_fan_control},
722-
{NULL, NULL}
720+
{ .tableFunction = tf_vega10_thermal_setup_fan_table },
721+
{ .tableFunction = tf_vega10_thermal_start_smc_fan_control },
722+
{ }
723723
};
724724

725725
static struct phm_master_table_header
@@ -731,10 +731,10 @@ vega10_thermal_start_thermal_controller_master = {
731731

732732
static struct phm_master_table_item
733733
vega10_thermal_set_temperature_range_master_list[] = {
734-
{NULL, tf_vega10_thermal_disable_alert},
735-
{NULL, tf_vega10_thermal_set_temperature_range},
736-
{NULL, tf_vega10_thermal_enable_alert},
737-
{NULL, NULL}
734+
{ .tableFunction = tf_vega10_thermal_disable_alert },
735+
{ .tableFunction = tf_vega10_thermal_set_temperature_range },
736+
{ .tableFunction = tf_vega10_thermal_enable_alert },
737+
{ }
738738
};
739739

740740
struct phm_master_table_header

0 commit comments

Comments
 (0)