diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-08-23 10:35:22 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-23 11:50:00 -0400 |
commit | cd6d6477f130c861c42e6eddc060e7c880e94bf3 (patch) | |
tree | 363b2348ac37b787c10f4b336f6e0642c35a8f0c | |
parent | cb0236eca79c8ceb5cdb8d2a15ce272e754d2921 (diff) |
ASoC: rt5645: make rt5645_platform_data const
Make these const as they are only used during a copy operation.
Done using Coccinelle.
@match disable optional_qualifier@
identifier s;
@@
static struct rt5645_platform_data s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
position ref.p;
identifier match.s,f,c;
expression e;
@@
(
e = s@p
|
e = s@p.f
|
c(...,s@p.f,...)
|
c(...,s@p,...)
)
@bad depends on !good1@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct rt5645_platform_data s;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt5645.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 500bb42d0804..d2f038001908 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c | |||
@@ -3559,7 +3559,7 @@ static const struct acpi_device_id rt5645_acpi_match[] = { | |||
3559 | MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match); | 3559 | MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match); |
3560 | #endif | 3560 | #endif |
3561 | 3561 | ||
3562 | static struct rt5645_platform_data general_platform_data = { | 3562 | static const struct rt5645_platform_data general_platform_data = { |
3563 | .dmic1_data_pin = RT5645_DMIC1_DISABLE, | 3563 | .dmic1_data_pin = RT5645_DMIC1_DISABLE, |
3564 | .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, | 3564 | .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, |
3565 | .jd_mode = 3, | 3565 | .jd_mode = 3, |
@@ -3593,7 +3593,7 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = { | |||
3593 | { } | 3593 | { } |
3594 | }; | 3594 | }; |
3595 | 3595 | ||
3596 | static struct rt5645_platform_data buddy_platform_data = { | 3596 | static const struct rt5645_platform_data buddy_platform_data = { |
3597 | .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5, | 3597 | .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5, |
3598 | .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, | 3598 | .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, |
3599 | .jd_mode = 3, | 3599 | .jd_mode = 3, |
@@ -3610,7 +3610,7 @@ static struct dmi_system_id dmi_platform_intel_broadwell[] = { | |||
3610 | { } | 3610 | { } |
3611 | }; | 3611 | }; |
3612 | 3612 | ||
3613 | static struct rt5645_platform_data gpd_win_platform_data = { | 3613 | static const struct rt5645_platform_data gpd_win_platform_data = { |
3614 | .jd_mode = 3, | 3614 | .jd_mode = 3, |
3615 | .inv_jd1_1 = true, | 3615 | .inv_jd1_1 = true, |
3616 | }; | 3616 | }; |