diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2018-02-21 12:23:03 -0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2018-02-21 19:37:41 -0800 |
| commit | 0df7be9b545debd5ea8e09cb9f55d6f8701c0367 (patch) | |
| tree | e20264a12238620fffb7f245f1b5f056eea3f522 | |
| parent | d7931e9a1fc32b19bfa1b4dde30d63d8520f331a (diff) | |
qcacld-3.0: Switch from module_param_call() to module_param_cb()
The definition of module_param_call() was changed in 4.15 and
in order to have module params that work on the kernel both
before and after that change switch to using module_param_cb()
since its definition has not changed.
Change-Id: I4af7c802ae62041636eda3047805630a16490e75
CRs-Fixed: 2193703
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 584d1c19287b..0c9d38a7ed03 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12250,7 +12250,8 @@ static void __exit hdd_module_exit(void) } #endif -static int fwpath_changed_handler(const char *kmessage, struct kernel_param *kp) +static int fwpath_changed_handler(const char *kmessage, + const struct kernel_param *kp) { return param_set_copystring(kmessage, kp); } @@ -12422,7 +12423,8 @@ static int hdd_register_req_mode(hdd_context_t *hdd_ctx, * * Return - 0 on success and failure code on failure */ -static int __con_mode_handler(const char *kmessage, struct kernel_param *kp, +static int __con_mode_handler(const char *kmessage, + const struct kernel_param *kp, hdd_context_t *hdd_ctx) { int ret; @@ -12521,7 +12523,7 @@ reset_flags: } -static int con_mode_handler(const char *kmessage, struct kernel_param *kp) +static int con_mode_handler(const char *kmessage, const struct kernel_param *kp) { int ret; hdd_context_t *hdd_ctx; @@ -13032,11 +13034,20 @@ MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Qualcomm Atheros, Inc."); MODULE_DESCRIPTION("WLAN HOST DEVICE DRIVER"); -module_param_call(con_mode, con_mode_handler, param_get_int, &con_mode, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +static const struct kernel_param_ops con_mode_ops = { + .set = con_mode_handler, + .get = param_get_int, +}; + +static const struct kernel_param_ops fwpath_ops = { + .set = fwpath_changed_handler, + .get = param_get_string, +}; -module_param_call(fwpath, fwpath_changed_handler, param_get_string, &fwpath, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param_cb(con_mode, &con_mode_ops, &con_mode, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); +module_param_cb(fwpath, &fwpath_ops, &fwpath, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); module_param(enable_dfs_chan_scan, int, S_IRUSR | S_IRGRP | S_IROTH); |
