* [PATCH] mfd: wm8994-regmap: Constify reg_default tables
@ 2015-07-07 11:10 Axel Lin
2015-07-07 12:06 ` Charles Keepax
2015-07-07 12:46 ` Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-07-07 11:10 UTC (permalink / raw)
To: Lee Jones; +Cc: Mark Brown, patches, linux-kernel
These reg_default tables are not modified after initialized, so make them
const.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mfd/wm8994-regmap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
index 300e9b6..c56b160 100644
--- a/drivers/mfd/wm8994-regmap.c
+++ b/drivers/mfd/wm8994-regmap.c
@@ -19,7 +19,7 @@
#include "wm8994.h"
-static struct reg_default wm1811_defaults[] = {
+static const struct reg_default wm1811_defaults[] = {
{ 0x0001, 0x0000 }, /* R1 - Power Management (1) */
{ 0x0002, 0x6000 }, /* R2 - Power Management (2) */
{ 0x0003, 0x0000 }, /* R3 - Power Management (3) */
@@ -251,7 +251,7 @@ static struct reg_default wm1811_defaults[] = {
{ 0x0748, 0x003F }, /* R1864 - IRQ Debounce */
};
-static struct reg_default wm8994_defaults[] = {
+static const struct reg_default wm8994_defaults[] = {
{ 0x0001, 0x0000 }, /* R1 - Power Management (1) */
{ 0x0002, 0x6000 }, /* R2 - Power Management (2) */
{ 0x0003, 0x0000 }, /* R3 - Power Management (3) */
@@ -470,7 +470,7 @@ static struct reg_default wm8994_defaults[] = {
{ 0x0748, 0x003F }, /* R1864 - IRQ Debounce */
};
-static struct reg_default wm8958_defaults[] = {
+static const struct reg_default wm8958_defaults[] = {
{ 0x0001, 0x0000 }, /* R1 - Power Management (1) */
{ 0x0002, 0x6000 }, /* R2 - Power Management (2) */
{ 0x0003, 0x0000 }, /* R3 - Power Management (3) */
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: wm8994-regmap: Constify reg_default tables
2015-07-07 11:10 [PATCH] mfd: wm8994-regmap: Constify reg_default tables Axel Lin
@ 2015-07-07 12:06 ` Charles Keepax
2015-07-07 12:46 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2015-07-07 12:06 UTC (permalink / raw)
To: Axel Lin; +Cc: Lee Jones, Mark Brown, patches, linux-kernel
On Tue, Jul 07, 2015 at 07:10:59PM +0800, Axel Lin wrote:
> These reg_default tables are not modified after initialized, so make them
> const.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: wm8994-regmap: Constify reg_default tables
2015-07-07 11:10 [PATCH] mfd: wm8994-regmap: Constify reg_default tables Axel Lin
2015-07-07 12:06 ` Charles Keepax
@ 2015-07-07 12:46 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2015-07-07 12:46 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, patches, linux-kernel
On Tue, 07 Jul 2015, Axel Lin wrote:
> These reg_default tables are not modified after initialized, so make them
> const.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/mfd/wm8994-regmap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
> index 300e9b6..c56b160 100644
> --- a/drivers/mfd/wm8994-regmap.c
> +++ b/drivers/mfd/wm8994-regmap.c
> @@ -19,7 +19,7 @@
>
> #include "wm8994.h"
>
> -static struct reg_default wm1811_defaults[] = {
> +static const struct reg_default wm1811_defaults[] = {
> { 0x0001, 0x0000 }, /* R1 - Power Management (1) */
> { 0x0002, 0x6000 }, /* R2 - Power Management (2) */
> { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
> @@ -251,7 +251,7 @@ static struct reg_default wm1811_defaults[] = {
> { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */
> };
>
> -static struct reg_default wm8994_defaults[] = {
> +static const struct reg_default wm8994_defaults[] = {
> { 0x0001, 0x0000 }, /* R1 - Power Management (1) */
> { 0x0002, 0x6000 }, /* R2 - Power Management (2) */
> { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
> @@ -470,7 +470,7 @@ static struct reg_default wm8994_defaults[] = {
> { 0x0748, 0x003F }, /* R1864 - IRQ Debounce */
> };
>
> -static struct reg_default wm8958_defaults[] = {
> +static const struct reg_default wm8958_defaults[] = {
> { 0x0001, 0x0000 }, /* R1 - Power Management (1) */
> { 0x0002, 0x6000 }, /* R2 - Power Management (2) */
> { 0x0003, 0x0000 }, /* R3 - Power Management (3) */
--
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] 3+ messages in thread
end of thread, other threads:[~2015-07-07 12:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07 11:10 [PATCH] mfd: wm8994-regmap: Constify reg_default tables Axel Lin
2015-07-07 12:06 ` Charles Keepax
2015-07-07 12:46 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox