diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2013-06-20 17:20:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-04 10:58:47 -0400 |
commit | 28e5ca73ef9072ed58dbb81cfff6f908be8e3cd4 (patch) | |
tree | 5de6f804a86f44734718b1e47e939321b2b90a45 /sound/soc | |
parent | 84bbc4aa2de97143db0f6ef0c3fa0bd84f73b207 (diff) |
ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
If the ssi or codec drivers are not loaded (for instance, because spi or i2c
bus drivers are not loaded), returning -EINVAL will for people to unload and
then reload the module to get sound working. Returning E_PROBE_DEFER will
mitigate this.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 7a8bc1220b2e..3f726e4f88db 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c | |||
@@ -113,13 +113,13 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
113 | ssi_pdev = of_find_device_by_node(ssi_np); | 113 | ssi_pdev = of_find_device_by_node(ssi_np); |
114 | if (!ssi_pdev) { | 114 | if (!ssi_pdev) { |
115 | dev_err(&pdev->dev, "failed to find SSI platform device\n"); | 115 | dev_err(&pdev->dev, "failed to find SSI platform device\n"); |
116 | ret = -EINVAL; | 116 | ret = -EPROBE_DEFER; |
117 | goto fail; | 117 | goto fail; |
118 | } | 118 | } |
119 | codec_dev = of_find_i2c_device_by_node(codec_np); | 119 | codec_dev = of_find_i2c_device_by_node(codec_np); |
120 | if (!codec_dev) { | 120 | if (!codec_dev) { |
121 | dev_err(&pdev->dev, "failed to find codec platform device\n"); | 121 | dev_err(&pdev->dev, "failed to find codec platform device\n"); |
122 | return -EINVAL; | 122 | return -EPROBE_DEFER; |
123 | } | 123 | } |
124 | 124 | ||
125 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); | 125 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |