linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array
Date: Tue, 20 Jan 2015 11:59:59 +0000	[thread overview]
Message-ID: <20150120115959.GY13701@x1> (raw)
In-Reply-To: <1420448493-9355-13-git-send-email-k.kozlowski@samsung.com>

On Mon, 05 Jan 2015, Krzysztof Kozlowski wrote:

> The regmap_config struct may be const because it is not modified by the
> driver and regmap_init() accepts pointer to const. Make array of
> struct reg_default const as well.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/twl-core.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied with Tony's Ack, thanks.

> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> index db11b4f40611..489674a2497e 100644
> --- a/drivers/mfd/twl-core.c
> +++ b/drivers/mfd/twl-core.c
> @@ -207,7 +207,7 @@ static struct twl_mapping twl4030_map[] = {
>  	{ 2, TWL5031_BASEADD_INTERRUPTS },
>  };
>  
> -static struct reg_default twl4030_49_defaults[] = {
> +static const struct reg_default twl4030_49_defaults[] = {
>  	/* Audio Registers */
>  	{ 0x01, 0x00}, /* CODEC_MODE	*/
>  	{ 0x02, 0x00}, /* OPTION	*/
> @@ -306,7 +306,7 @@ static const struct regmap_access_table twl4030_49_volatile_table = {
>  	.n_yes_ranges = ARRAY_SIZE(twl4030_49_volatile_ranges),
>  };
>  
> -static struct regmap_config twl4030_regmap_config[4] = {
> +static const struct regmap_config twl4030_regmap_config[4] = {
>  	{
>  		/* Address 0x48 */
>  		.reg_bits = 8,
> @@ -369,7 +369,7 @@ static struct twl_mapping twl6030_map[] = {
>  	{ 1, TWL6030_BASEADD_GASGAUGE },
>  };
>  
> -static struct regmap_config twl6030_regmap_config[3] = {
> +static const struct regmap_config twl6030_regmap_config[3] = {
>  	{
>  		/* Address 0x48 */
>  		.reg_bits = 8,
> @@ -1087,7 +1087,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  	struct twl4030_platform_data	*pdata = dev_get_platdata(&client->dev);
>  	struct device_node		*node = client->dev.of_node;
>  	struct platform_device		*pdev;
> -	struct regmap_config		*twl_regmap_config;
> +	const struct regmap_config	*twl_regmap_config;
>  	int				irq_base = 0;
>  	int				status;
>  	unsigned			i, num_slaves;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2015-01-20 11:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1420448493-9355-1-git-send-email-k.kozlowski@samsung.com>
2015-01-05  9:01 ` [PATCH 11/14] mfd: tps65217: Constify struct regmap_config Krzysztof Kozlowski
2015-01-06 17:11   ` Tony Lindgren
2015-01-20 11:59   ` Lee Jones
2015-01-05  9:01 ` [PATCH 12/14] mfd: tps65218: " Krzysztof Kozlowski
2015-01-20 11:59   ` Lee Jones
2015-01-05  9:01 ` [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array Krzysztof Kozlowski
2015-01-06 17:12   ` Tony Lindgren
2015-01-20 11:59   ` Lee Jones [this message]
2015-01-05  9:01 ` [PATCH 14/14] mfd: twl6040: " Krzysztof Kozlowski
2015-01-06 17:12   ` Tony Lindgren
2015-01-20 12:00   ` Lee Jones

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=20150120115959.GY13701@x1 \
    --to=lee.jones@linaro.org \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.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 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).