From: Stephen Boyd <sboyd@codeaurora.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] regulator: core: Add checking set_mode callback in regulator_set_optimum_mode
Date: Fri, 13 Apr 2012 22:00:02 -0700 [thread overview]
Message-ID: <4F890452.1060709@codeaurora.org> (raw)
In-Reply-To: <1334314167.4244.1.camel@phoenix>
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.
prev parent reply other threads:[~2012-04-14 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 10:49 [PATCH] regulator: core: Add checking set_mode callback in regulator_set_optimum_mode Axel Lin
2012-04-14 5:00 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F890452.1060709@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.