Skip to content

Commit

Permalink
drm/amd/powerplay: Use designated initializers
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kees committed May 28, 2017
1 parent 2a9d6d2 commit 3ddd396
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,17 +709,17 @@ static int tf_vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr,

static struct phm_master_table_item
vega10_thermal_start_thermal_controller_master_list[] = {
{NULL, tf_vega10_thermal_initialize},
{NULL, tf_vega10_thermal_set_temperature_range},
{NULL, tf_vega10_thermal_enable_alert},
{ .tableFunction = tf_vega10_thermal_initialize },
{ .tableFunction = tf_vega10_thermal_set_temperature_range },
{ .tableFunction = tf_vega10_thermal_enable_alert },
/* We should restrict performance levels to low before we halt the SMC.
* On the other hand we are still in boot state when we do this
* so it would be pointless.
* If this assumption changes we have to revisit this table.
*/
{NULL, tf_vega10_thermal_setup_fan_table},
{NULL, tf_vega10_thermal_start_smc_fan_control},
{NULL, NULL}
{ .tableFunction = tf_vega10_thermal_setup_fan_table },
{ .tableFunction = tf_vega10_thermal_start_smc_fan_control },
{ }
};

static struct phm_master_table_header
Expand All @@ -731,10 +731,10 @@ vega10_thermal_start_thermal_controller_master = {

static struct phm_master_table_item
vega10_thermal_set_temperature_range_master_list[] = {
{NULL, tf_vega10_thermal_disable_alert},
{NULL, tf_vega10_thermal_set_temperature_range},
{NULL, tf_vega10_thermal_enable_alert},
{NULL, NULL}
{ .tableFunction = tf_vega10_thermal_disable_alert },
{ .tableFunction = tf_vega10_thermal_set_temperature_range },
{ .tableFunction = tf_vega10_thermal_enable_alert },
{ }
};

struct phm_master_table_header
Expand Down

0 comments on commit 3ddd396

Please sign in to comment.