Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cbccef3 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

regulator: Fix compiler warnings



gcc 6.1.1 triggers a few compiler warnings for uninitalized
variables and an incorrect return type for a inline function.

Fixes: ee1e5e10 ("regulator: Addsnapshot of qpnp-labibb regulator driver")
Change-Id: Ic0dedbada0e3d4984fbf134ca0969106751a2524
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 79376733
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)	"%s: " fmt, __func__
@@ -1533,7 +1533,7 @@ static int qpnp_lab_rdson_nfet_config(struct qpnp_labibb *labibb, u32 tmp)
		return -EINVAL;
	}

	val |= (i << LAB_RDSON_MNGMNT_NFET_SHIFT) |
	val = (i << LAB_RDSON_MNGMNT_NFET_SHIFT) |
			LAB_RDSON_MNGMNT_NFET_SLEW_EN;
	mask = LAB_RDSON_MNGMNT_NFET_MASK | LAB_RDSON_MNGMNT_NFET_SLEW_EN;
	rc = qpnp_labibb_masked_write(labibb, labibb->lab_base +
@@ -3803,7 +3803,7 @@ static struct regulator_ops qpnp_ibb_ops = {
	.get_voltage		= qpnp_ibb_regulator_get_voltage,
};

static qpnp_ibb_get_current_voltage(struct qpnp_labibb *labibb,
static int qpnp_ibb_get_current_voltage(struct qpnp_labibb *labibb,
				    struct device_node *of_node)
{
	int rc;