mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
dce: Use kstrtobool instead of strtobool
The function strtobool() is implemented inline with using kstrtobool(). The function strtobool() is removed from mainline Linux 6.7 with below change. ** commit 9bf2850c9170b52a6ab052085feced55effa78ef Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr> kstrtox: remove strtobool() ** Use the kstrtobool() now. Bug 4346767 Change-Id: I3b63684bcfc5621a3833b62061ea1cfdf44b3865 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019996 Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
83d4b9f0bb
commit
1d4285fa30
@@ -131,7 +131,7 @@ static ssize_t dbg_dce_load_fw_write(struct file *file,
|
|||||||
if (copy_from_user(buf, user_buf, buf_size))
|
if (copy_from_user(buf, user_buf, buf_size))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (strtobool(buf, &bv) == 0) {
|
if (kstrtobool(buf, &bv) == 0) {
|
||||||
if (bv == true) {
|
if (bv == true) {
|
||||||
ret = dbg_dce_load_fw(d);
|
ret = dbg_dce_load_fw(d);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -176,7 +176,7 @@ static ssize_t dbg_dce_config_ast_write(struct file *file,
|
|||||||
if (copy_from_user(buf, user_buf, buf_size))
|
if (copy_from_user(buf, user_buf, buf_size))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (strtobool(buf, &bv) == 0) {
|
if (kstrtobool(buf, &bv) == 0) {
|
||||||
if (bv == true)
|
if (bv == true)
|
||||||
dbg_dce_config_ast(d);
|
dbg_dce_config_ast(d);
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ static ssize_t dbg_dce_reset_dce_fops_write(struct file *file,
|
|||||||
if (copy_from_user(buf, user_buf, buf_size))
|
if (copy_from_user(buf, user_buf, buf_size))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (strtobool(buf, &bv) == 0) {
|
if (kstrtobool(buf, &bv) == 0) {
|
||||||
if (bv == true) {
|
if (bv == true) {
|
||||||
ret = dbg_dce_reset_dce(d);
|
ret = dbg_dce_reset_dce(d);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -455,7 +455,7 @@ static ssize_t dbg_dce_boot_dce_fops_write(struct file *file,
|
|||||||
if (copy_from_user(buf, user_buf, buf_size))
|
if (copy_from_user(buf, user_buf, buf_size))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (strtobool(buf, &bv) == 0) {
|
if (kstrtobool(buf, &bv) == 0) {
|
||||||
if (bv == true) {
|
if (bv == true) {
|
||||||
ret = dbg_dce_boot_dce(d);
|
ret = dbg_dce_boot_dce(d);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|||||||
Reference in New Issue
Block a user