Commit 778d2b0e authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: ufs: Switch to aggregate initialization

Make it easier to verify for humans that ufshcd_init_pwr_dev_param()
initializes all structure members. This patch does not change any
functionality.

Link: https://lore.kernel.org/r/20220419225811.4127248-14-bvanassche@acm.orgTested-by: default avatarBean Huo <beanhuo@micron.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Reviewed-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9474c64e
...@@ -297,18 +297,20 @@ EXPORT_SYMBOL_GPL(ufshcd_get_pwr_dev_param); ...@@ -297,18 +297,20 @@ EXPORT_SYMBOL_GPL(ufshcd_get_pwr_dev_param);
void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param) void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param)
{ {
dev_param->tx_lanes = 2; *dev_param = (struct ufs_dev_params){
dev_param->rx_lanes = 2; .tx_lanes = 2,
dev_param->hs_rx_gear = UFS_HS_G3; .rx_lanes = 2,
dev_param->hs_tx_gear = UFS_HS_G3; .hs_rx_gear = UFS_HS_G3,
dev_param->pwm_rx_gear = UFS_PWM_G4; .hs_tx_gear = UFS_HS_G3,
dev_param->pwm_tx_gear = UFS_PWM_G4; .pwm_rx_gear = UFS_PWM_G4,
dev_param->rx_pwr_pwm = SLOW_MODE; .pwm_tx_gear = UFS_PWM_G4,
dev_param->tx_pwr_pwm = SLOW_MODE; .rx_pwr_pwm = SLOW_MODE,
dev_param->rx_pwr_hs = FAST_MODE; .tx_pwr_pwm = SLOW_MODE,
dev_param->tx_pwr_hs = FAST_MODE; .rx_pwr_hs = FAST_MODE,
dev_param->hs_rate = PA_HS_MODE_B; .tx_pwr_hs = FAST_MODE,
dev_param->desired_working_mode = UFS_HS_MODE; .hs_rate = PA_HS_MODE_B,
.desired_working_mode = UFS_HS_MODE,
};
} }
EXPORT_SYMBOL_GPL(ufshcd_init_pwr_dev_param); EXPORT_SYMBOL_GPL(ufshcd_init_pwr_dev_param);
......
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