From: Guodong Xu <guodong.xu@linaro.org>
To: Axel Lin <axel.lin@ingics.com>, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: Fix build error due to const qualifier for ops
Date: Mon, 18 Aug 2014 21:06:17 +0800 [thread overview]
Message-ID: <53F1FA49.5000508@linaro.org> (raw)
In-Reply-To: <1408329248.12083.2.camel@phoenix>
I'm sending a patch to fix the build error on mc13892-regulator.c
-Guodong
On 08/18/2014 10:34 AM, Axel Lin wrote:
> Drop const qualifier for ops of struct regulator_desc.
> Allow regulator drivers to update ops before registering regulator.
>
> Fix below build error:
> CC [M] drivers/regulator/mc13892-regulator.o
> drivers/regulator/mc13892-regulator.c: In function 'mc13892_regulator_probe':
> drivers/regulator/mc13892-regulator.c:586:3: error: assignment of member 'set_mode' in read-only object
> drivers/regulator/mc13892-regulator.c:588:3: error: assignment of member 'get_mode' in read-only object
> make[2]: *** [drivers/regulator/mc13892-regulator.o] Error 1
> make[1]: *** [drivers/regulator] Error 2
> make: *** [drivers] Error 2
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> include/linux/regulator/driver.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
> index efe058f..3abda75 100644
> --- a/include/linux/regulator/driver.h
> +++ b/include/linux/regulator/driver.h
> @@ -246,7 +246,7 @@ struct regulator_desc {
> int id;
> bool continuous_voltage_range;
> unsigned n_voltages;
> - const struct regulator_ops *ops;
> + struct regulator_ops *ops;
> int irq;
> enum regulator_type type;
> struct module *owner;
>
next prev parent reply other threads:[~2014-08-18 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 2:34 [PATCH] regulator: core: Fix build error due to const qualifier for ops Axel Lin
2014-08-18 13:06 ` Guodong Xu [this message]
2014-08-18 14:10 ` Mark Brown
2014-08-20 2:51 ` Axel Lin
2014-08-20 15:17 ` Mark Brown
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=53F1FA49.5000508@linaro.org \
--to=guodong.xu@linaro.org \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).