linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/14] mfd: tps65217: Constify struct regmap_config
       [not found] <1420448493-9355-1-git-send-email-k.kozlowski@samsung.com>
@ 2015-01-05  9:01 ` 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
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:01 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, linux-kernel
  Cc: Krzysztof Kozlowski, Tony Lindgren, linux-omap

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
---
 drivers/mfd/tps65217.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 80a919a8ca97..7d1cfc1d3ce0 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -145,7 +145,7 @@ int tps65217_clear_bits(struct tps65217 *tps, unsigned int reg,
 }
 EXPORT_SYMBOL_GPL(tps65217_clear_bits);
 
-static struct regmap_config tps65217_regmap_config = {
+static const struct regmap_config tps65217_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 12/14] mfd: tps65218: Constify struct regmap_config
       [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-05  9:01 ` 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-05  9:01 ` [PATCH 14/14] mfd: twl6040: " Krzysztof Kozlowski
  3 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:01 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, linux-kernel
  Cc: Krzysztof Kozlowski, Tony Lindgren, linux-omap

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
---
 drivers/mfd/tps65218.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index 0d256cb002eb..b019b3198afe 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -125,7 +125,7 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
 }
 EXPORT_SYMBOL_GPL(tps65218_clear_bits);
 
-static struct regmap_config tps65218_regmap_config = {
+static const struct regmap_config tps65218_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.cache_type = REGCACHE_RBTREE,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array
       [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-05  9:01 ` [PATCH 12/14] mfd: tps65218: " Krzysztof Kozlowski
@ 2015-01-05  9:01 ` Krzysztof Kozlowski
  2015-01-06 17:12   ` Tony Lindgren
  2015-01-20 11:59   ` Lee Jones
  2015-01-05  9:01 ` [PATCH 14/14] mfd: twl6040: " Krzysztof Kozlowski
  3 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:01 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, linux-kernel
  Cc: Krzysztof Kozlowski, Tony Lindgren, linux-omap

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(-)

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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 14/14] mfd: twl6040: Constify struct regmap_config and reg_default array
       [not found] <1420448493-9355-1-git-send-email-k.kozlowski@samsung.com>
                   ` (2 preceding siblings ...)
  2015-01-05  9:01 ` [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array Krzysztof Kozlowski
@ 2015-01-05  9:01 ` Krzysztof Kozlowski
  2015-01-06 17:12   ` Tony Lindgren
  2015-01-20 12:00   ` Lee Jones
  3 siblings, 2 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:01 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, linux-kernel
  Cc: Krzysztof Kozlowski, Tony Lindgren, linux-omap

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/twl6040.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index 9687645162ae..f71ee3dbc2a2 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -44,7 +44,7 @@
 #define VIBRACTRL_MEMBER(reg) ((reg == TWL6040_REG_VIBCTLL) ? 0 : 1)
 #define TWL6040_NUM_SUPPLIES	(2)
 
-static struct reg_default twl6040_defaults[] = {
+static const struct reg_default twl6040_defaults[] = {
 	{ 0x01, 0x4B }, /* REG_ASICID	(ro) */
 	{ 0x02, 0x00 }, /* REG_ASICREV	(ro) */
 	{ 0x03, 0x00 }, /* REG_INTID	*/
@@ -580,7 +580,7 @@ static bool twl6040_writeable_reg(struct device *dev, unsigned int reg)
 	}
 }
 
-static struct regmap_config twl6040_regmap_config = {
+static const struct regmap_config twl6040_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 11/14] mfd: tps65217: Constify struct regmap_config
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2015-01-06 17:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, Lee Jones, linux-kernel, linux-omap

* Krzysztof Kozlowski <k.kozlowski@samsung.com> [150105 01:04]:
> The regmap_config struct may be const because it is not modified by the
> driver and regmap_init() accepts pointer to const.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Acked-by: Tony Lindgren <tony@atomide.com>

> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/tps65217.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> index 80a919a8ca97..7d1cfc1d3ce0 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -145,7 +145,7 @@ int tps65217_clear_bits(struct tps65217 *tps, unsigned int reg,
>  }
>  EXPORT_SYMBOL_GPL(tps65217_clear_bits);
>  
> -static struct regmap_config tps65217_regmap_config = {
> +static const struct regmap_config tps65217_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2015-01-06 17:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, Lee Jones, linux-kernel, linux-omap

* Krzysztof Kozlowski <k.kozlowski@samsung.com> [150105 01:04]:
> 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>

Acked-by: Tony Lindgren <tony@atomide.com>

> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/twl-core.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> 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;
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 14/14] mfd: twl6040: Constify struct regmap_config and reg_default array
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2015-01-06 17:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, Lee Jones, linux-kernel, linux-omap

* Krzysztof Kozlowski <k.kozlowski@samsung.com> [150105 01:04]:
> 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>

Acked-by: Tony Lindgren <tony@atomide.com>

> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/twl6040.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
> index 9687645162ae..f71ee3dbc2a2 100644
> --- a/drivers/mfd/twl6040.c
> +++ b/drivers/mfd/twl6040.c
> @@ -44,7 +44,7 @@
>  #define VIBRACTRL_MEMBER(reg) ((reg == TWL6040_REG_VIBCTLL) ? 0 : 1)
>  #define TWL6040_NUM_SUPPLIES	(2)
>  
> -static struct reg_default twl6040_defaults[] = {
> +static const struct reg_default twl6040_defaults[] = {
>  	{ 0x01, 0x4B }, /* REG_ASICID	(ro) */
>  	{ 0x02, 0x00 }, /* REG_ASICREV	(ro) */
>  	{ 0x03, 0x00 }, /* REG_INTID	*/
> @@ -580,7 +580,7 @@ static bool twl6040_writeable_reg(struct device *dev, unsigned int reg)
>  	}
>  }
>  
> -static struct regmap_config twl6040_regmap_config = {
> +static const struct regmap_config twl6040_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 11/14] mfd: tps65217: Constify struct regmap_config
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Lee Jones @ 2015-01-20 11:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap

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.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/tps65217.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied with Tony's Ack, thanks.

> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> index 80a919a8ca97..7d1cfc1d3ce0 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -145,7 +145,7 @@ int tps65217_clear_bits(struct tps65217 *tps, unsigned int reg,
>  }
>  EXPORT_SYMBOL_GPL(tps65217_clear_bits);
>  
> -static struct regmap_config tps65217_regmap_config = {
> +static const struct regmap_config tps65217_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 12/14] mfd: tps65218: Constify struct regmap_config
  2015-01-05  9:01 ` [PATCH 12/14] mfd: tps65218: " Krzysztof Kozlowski
@ 2015-01-20 11:59   ` Lee Jones
  0 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2015-01-20 11:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap

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.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/mfd/tps65218.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied with Tony's Ack, thanks.

> diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
> index 0d256cb002eb..b019b3198afe 100644
> --- a/drivers/mfd/tps65218.c
> +++ b/drivers/mfd/tps65218.c
> @@ -125,7 +125,7 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
>  }
>  EXPORT_SYMBOL_GPL(tps65218_clear_bits);
>  
> -static struct regmap_config tps65218_regmap_config = {
> +static const struct regmap_config tps65218_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.cache_type = REGCACHE_RBTREE,

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 13/14] mfd: twl-core: Constify struct regmap_config and reg_default array
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Lee Jones @ 2015-01-20 11:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 14/14] mfd: twl6040: Constify struct regmap_config and reg_default array
  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
  1 sibling, 0 replies; 11+ messages in thread
From: Lee Jones @ 2015-01-20 12:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Samuel Ortiz, linux-kernel, Tony Lindgren, linux-omap

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/twl6040.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied with Tony's Ack, thanks.

> diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
> index 9687645162ae..f71ee3dbc2a2 100644
> --- a/drivers/mfd/twl6040.c
> +++ b/drivers/mfd/twl6040.c
> @@ -44,7 +44,7 @@
>  #define VIBRACTRL_MEMBER(reg) ((reg == TWL6040_REG_VIBCTLL) ? 0 : 1)
>  #define TWL6040_NUM_SUPPLIES	(2)
>  
> -static struct reg_default twl6040_defaults[] = {
> +static const struct reg_default twl6040_defaults[] = {
>  	{ 0x01, 0x4B }, /* REG_ASICID	(ro) */
>  	{ 0x02, 0x00 }, /* REG_ASICREV	(ro) */
>  	{ 0x03, 0x00 }, /* REG_INTID	*/
> @@ -580,7 +580,7 @@ static bool twl6040_writeable_reg(struct device *dev, unsigned int reg)
>  	}
>  }
>  
> -static struct regmap_config twl6040_regmap_config = {
> +static const struct regmap_config twl6040_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-20 12:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
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

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).