diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-01-22 07:00:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-22 12:13:45 -0500 |
commit | f83183ca3c25275706427a9f88f83208dec647d1 (patch) | |
tree | c7d68ceb9b68bfdbb841c67495cd69d18f191458 /sound/soc | |
parent | 9eeb95727c1137217d61141096c308dc04c234d1 (diff) |
ASoC: samsung: smdk_wm8994: Fix build error
Fixes the following build error and warning when OF is not defined:
sound/soc/samsung/smdk_wm8994.c:191:23: error: ‘samsung_wm8994_of_match’ undeclared (first use in this function)
sound/soc/samsung/smdk_wm8994.c:47:32: warning: ‘smdk_board_data’ defined but not used [-Wunused-variable]
of_match_ptr() is used so that samsung_wm8994_of_match gets dropped (as unused)
by the compiler when OF is not defined.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/samsung/smdk_wm8994.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index b072bd107b31..d38ae98e2f32 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c | |||
@@ -152,13 +152,11 @@ static struct snd_soc_card smdk = { | |||
152 | .num_links = ARRAY_SIZE(smdk_dai), | 152 | .num_links = ARRAY_SIZE(smdk_dai), |
153 | }; | 153 | }; |
154 | 154 | ||
155 | #ifdef CONFIG_OF | ||
156 | static const struct of_device_id samsung_wm8994_of_match[] = { | 155 | static const struct of_device_id samsung_wm8994_of_match[] = { |
157 | { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data }, | 156 | { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data }, |
158 | {}, | 157 | {}, |
159 | }; | 158 | }; |
160 | MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); | 159 | MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); |
161 | #endif /* CONFIG_OF */ | ||
162 | 160 | ||
163 | static int smdk_audio_probe(struct platform_device *pdev) | 161 | static int smdk_audio_probe(struct platform_device *pdev) |
164 | { | 162 | { |
@@ -188,7 +186,7 @@ static int smdk_audio_probe(struct platform_device *pdev) | |||
188 | smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; | 186 | smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; |
189 | } | 187 | } |
190 | 188 | ||
191 | id = of_match_device(samsung_wm8994_of_match, &pdev->dev); | 189 | id = of_match_device(of_match_ptr(samsung_wm8994_of_match), &pdev->dev); |
192 | if (id) | 190 | if (id) |
193 | *board = *((struct smdk_wm8994_data *)id->data); | 191 | *board = *((struct smdk_wm8994_data *)id->data); |
194 | 192 | ||