aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-sgtl5000.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index 4bb273786ff3..61822cc53bd3 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -122,14 +122,12 @@ static struct snd_soc_card mxs_sgtl5000 = {
122 .num_links = ARRAY_SIZE(mxs_sgtl5000_dai), 122 .num_links = ARRAY_SIZE(mxs_sgtl5000_dai),
123}; 123};
124 124
125static int mxs_sgtl5000_probe_dt(struct platform_device *pdev) 125static int mxs_sgtl5000_probe(struct platform_device *pdev)
126{ 126{
127 struct snd_soc_card *card = &mxs_sgtl5000;
128 int ret, i;
127 struct device_node *np = pdev->dev.of_node; 129 struct device_node *np = pdev->dev.of_node;
128 struct device_node *saif_np[2], *codec_np; 130 struct device_node *saif_np[2], *codec_np;
129 int i;
130
131 if (!np)
132 return 1; /* no device tree */
133 131
134 saif_np[0] = of_parse_phandle(np, "saif-controllers", 0); 132 saif_np[0] = of_parse_phandle(np, "saif-controllers", 0);
135 saif_np[1] = of_parse_phandle(np, "saif-controllers", 1); 133 saif_np[1] = of_parse_phandle(np, "saif-controllers", 1);
@@ -152,18 +150,6 @@ static int mxs_sgtl5000_probe_dt(struct platform_device *pdev)
152 of_node_put(saif_np[0]); 150 of_node_put(saif_np[0]);
153 of_node_put(saif_np[1]); 151 of_node_put(saif_np[1]);
154 152
155 return 0;
156}
157
158static int mxs_sgtl5000_probe(struct platform_device *pdev)
159{
160 struct snd_soc_card *card = &mxs_sgtl5000;
161 int ret;
162
163 ret = mxs_sgtl5000_probe_dt(pdev);
164 if (ret < 0)
165 return ret;
166
167 /* 153 /*
168 * Set an init clock(11.28Mhz) for sgtl5000 initialization(i2c r/w). 154 * Set an init clock(11.28Mhz) for sgtl5000 initialization(i2c r/w).
169 * The Sgtl5000 sysclk is derived from saif0 mclk and it's range 155 * The Sgtl5000 sysclk is derived from saif0 mclk and it's range