* [PATCH 1/3] ASoC: samsung: Remove unused "samsung-i2sv4" platform_device_id entry
@ 2016-04-08 16:52 Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 2/3] ASoC: samsung: Remove definition of an unused data structure Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 3/3] ASoC: samsung: Use of_device_get_match_data() helper Sylwester Nawrocki
0 siblings, 2 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2016-04-08 16:52 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, linux-samsung-soc, Sylwester Nawrocki
"samsung-i2sv4" identifier was previously used for the I2S device
of the S5PV210 SoCs, it can be removed now when s5pv210 is a dt-only
platform.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
sound/soc/samsung/i2s.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 70a2559..ededac9 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1492,9 +1492,6 @@ static const struct platform_device_id samsung_i2s_driver_ids[] = {
}, {
.name = "samsung-i2s-sec",
.driver_data = (kernel_ulong_t)&samsung_dai_type_sec,
- }, {
- .name = "samsung-i2sv4",
- .driver_data = (kernel_ulong_t)&i2sv5_dai_type,
},
{},
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] ASoC: samsung: Remove definition of an unused data structure
2016-04-08 16:52 [PATCH 1/3] ASoC: samsung: Remove unused "samsung-i2sv4" platform_device_id entry Sylwester Nawrocki
@ 2016-04-08 16:52 ` Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 3/3] ASoC: samsung: Use of_device_get_match_data() helper Sylwester Nawrocki
1 sibling, 0 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2016-04-08 16:52 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, linux-samsung-soc, Sylwester Nawrocki
samsung_dai_type_pri is not referenced anywhere so remove it.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
sound/soc/samsung/i2s.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index ededac9..7ea030e 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1477,10 +1477,6 @@ static const struct samsung_i2s_dai_data i2sv5_dai_type_i2s1 = {
.i2s_variant_regs = &i2sv5_i2s1_regs,
};
-static const struct samsung_i2s_dai_data samsung_dai_type_pri = {
- .dai_type = TYPE_PRI,
-};
-
static const struct samsung_i2s_dai_data samsung_dai_type_sec = {
.dai_type = TYPE_SEC,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] ASoC: samsung: Use of_device_get_match_data() helper
2016-04-08 16:52 [PATCH 1/3] ASoC: samsung: Remove unused "samsung-i2sv4" platform_device_id entry Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 2/3] ASoC: samsung: Remove definition of an unused data structure Sylwester Nawrocki
@ 2016-04-08 16:52 ` Sylwester Nawrocki
1 sibling, 0 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2016-04-08 16:52 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, linux-samsung-soc, Sylwester Nawrocki
Simplify the code a little by using a standard function for
getting the match data.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
sound/soc/samsung/i2s.c | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 7ea030e..27ca116 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -18,6 +18,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <linux/pm_runtime.h>
@@ -1106,21 +1107,6 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
return i2s;
}
-static const struct of_device_id exynos_i2s_match[];
-
-static inline const struct samsung_i2s_dai_data *samsung_i2s_get_driver_data(
- struct platform_device *pdev)
-{
- if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
- const struct of_device_id *match;
- match = of_match_node(exynos_i2s_match, pdev->dev.of_node);
- return match ? match->data : NULL;
- } else {
- return (struct samsung_i2s_dai_data *)
- platform_get_device_id(pdev)->driver_data;
- }
-}
-
#ifdef CONFIG_PM
static int i2s_runtime_suspend(struct device *dev)
{
@@ -1233,9 +1219,13 @@ static int samsung_i2s_probe(struct platform_device *pdev)
const struct samsung_i2s_dai_data *i2s_dai_data;
int ret;
- /* Call during Seconday interface registration */
- i2s_dai_data = samsung_i2s_get_driver_data(pdev);
+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node)
+ i2s_dai_data = of_device_get_match_data(&pdev->dev);
+ else
+ i2s_dai_data = (struct samsung_i2s_dai_data *)
+ platform_get_device_id(pdev)->driver_data;
+ /* Call during the secondary interface registration */
if (i2s_dai_data->dai_type == TYPE_SEC) {
sec_dai = dev_get_drvdata(&pdev->dev);
if (!sec_dai) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-08 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 16:52 [PATCH 1/3] ASoC: samsung: Remove unused "samsung-i2sv4" platform_device_id entry Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 2/3] ASoC: samsung: Remove definition of an unused data structure Sylwester Nawrocki
2016-04-08 16:52 ` [PATCH 3/3] ASoC: samsung: Use of_device_get_match_data() helper Sylwester Nawrocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.