[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4F890452.1060709@codeaurora.org>
Date: Fri, 13 Apr 2012 22:00:02 -0700
From: Stephen Boyd <sboyd@...eaurora.org>
To: Axel Lin <axel.lin@...il.com>
CC: linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Liam Girdwood <lrg@...com>
Subject: Re: [PATCH] regulator: core: Add checking set_mode callback in regulator_set_optimum_mode
On 4/13/2012 3:49 AM, Axel Lin wrote:
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 1bd71a8..f241671 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2340,6 +2340,11 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
> */
> ret = -EINVAL;
>
> + if (!rdev->desc->ops->set_mode) {
> + rdev_err(rdev, "no set_mode operation\n");
> + goto out;
> + }
> +
> /* get output voltage */
regulator_set_mode() just returns an error silently if there isn't a
set_mode() op. Why print an error in this case?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists