power: supply: qti_battery_charger: Fix debugfs_create_bool() usage

debugfs_create_bool() return type got changed. Fix it.

Change-Id: Ia83ed4b50a42b22718bdf5bc6ba0c2b25f0a5631
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
This commit is contained in:
Subbaraman Narayanamurthy 2021-12-03 19:07:52 -08:00 committed by Anjelique Melendez
parent 0381948dcc
commit d3e136b723

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#define pr_fmt(fmt) "BATTERY_CHG: %s: " fmt, __func__
@ -1820,7 +1821,7 @@ ATTRIBUTE_GROUPS(battery_class);
static void battery_chg_add_debugfs(struct battery_chg_dev *bcdev)
{
int rc;
struct dentry *dir, *file;
struct dentry *dir;
dir = debugfs_create_dir("battery_charger", NULL);
if (IS_ERR(dir)) {
@ -1830,19 +1831,8 @@ static void battery_chg_add_debugfs(struct battery_chg_dev *bcdev)
return;
}
file = debugfs_create_bool("block_tx", 0600, dir, &bcdev->block_tx);
if (IS_ERR(file)) {
rc = PTR_ERR(file);
pr_err("Failed to create block_tx debugfs file, rc=%d\n",
rc);
goto error;
}
bcdev->debugfs_dir = dir;
return;
error:
debugfs_remove_recursive(dir);
debugfs_create_bool("block_tx", 0600, dir, &bcdev->block_tx);
}
#else
static void battery_chg_add_debugfs(struct battery_chg_dev *bcdev) { }