Commit 9a4327fd authored by Keoseong Park's avatar Keoseong Park Committed by Martin K. Petersen

scsi: ufs: core: Change the module parameter macro of use_mcq_mode

mcq_mode_ops uses only param_{set,get}_bool(). Therefore, convert
module_param_cb() to module_param() and remove the mcq_mode_ops.
Signed-off-by: default avatarKeoseong Park <keosung.park@samsung.com>
Link: https://lore.kernel.org/r/20230427094420epcms2p1043333a3e0c0cf58e66164e0b83b3b02@epcms2p1Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2a954832
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
/* Polling time to wait for fDeviceInit */ /* Polling time to wait for fDeviceInit */
#define FDEVICEINIT_COMPL_TIMEOUT 1500 /* millisecs */ #define FDEVICEINIT_COMPL_TIMEOUT 1500 /* millisecs */
/* UFSHC 4.0 compliant HC support this mode, refer param_set_mcq_mode() */ /* UFSHC 4.0 compliant HC support this mode. */
static bool use_mcq_mode = true; static bool use_mcq_mode = true;
static bool is_mcq_supported(struct ufs_hba *hba) static bool is_mcq_supported(struct ufs_hba *hba)
...@@ -106,23 +106,7 @@ static bool is_mcq_supported(struct ufs_hba *hba) ...@@ -106,23 +106,7 @@ static bool is_mcq_supported(struct ufs_hba *hba)
return hba->mcq_sup && use_mcq_mode; return hba->mcq_sup && use_mcq_mode;
} }
static int param_set_mcq_mode(const char *val, const struct kernel_param *kp) module_param(use_mcq_mode, bool, 0644);
{
int ret;
ret = param_set_bool(val, kp);
if (ret)
return ret;
return 0;
}
static const struct kernel_param_ops mcq_mode_ops = {
.set = param_set_mcq_mode,
.get = param_get_bool,
};
module_param_cb(use_mcq_mode, &mcq_mode_ops, &use_mcq_mode, 0644);
MODULE_PARM_DESC(use_mcq_mode, "Control MCQ mode for controllers starting from UFSHCI 4.0. 1 - enable MCQ, 0 - disable MCQ. MCQ is enabled by default"); MODULE_PARM_DESC(use_mcq_mode, "Control MCQ mode for controllers starting from UFSHCI 4.0. 1 - enable MCQ, 0 - disable MCQ. MCQ is enabled by default");
#define ufshcd_toggle_vreg(_dev, _vreg, _on) \ #define ufshcd_toggle_vreg(_dev, _vreg, _on) \
......
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