kirkwood-i2s.c (40a0c68ca9b49fb3e7292c1bae035ba5bcb27903) | kirkwood-i2s.c (84aac6c79bfdcfbcd8541c814b365c3001cdf5e6) |
---|---|
1/* 2 * kirkwood-i2s.c 3 * 4 * (c) 2010 Arnaud Patard <apatard@mandriva.com> 5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 482 unchanged lines hidden (view full) --- 491 return PTR_ERR(priv->clk); 492 } 493 494 err = clk_prepare_enable(priv->clk); 495 if (err < 0) 496 return err; 497 498 priv->extclk = devm_clk_get(&pdev->dev, "extclk"); | 1/* 2 * kirkwood-i2s.c 3 * 4 * (c) 2010 Arnaud Patard <apatard@mandriva.com> 5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 482 unchanged lines hidden (view full) --- 491 return PTR_ERR(priv->clk); 492 } 493 494 err = clk_prepare_enable(priv->clk); 495 if (err < 0) 496 return err; 497 498 priv->extclk = devm_clk_get(&pdev->dev, "extclk"); |
499 if (!IS_ERR(priv->extclk)) { | 499 if (IS_ERR(priv->extclk)) { 500 if (PTR_ERR(priv->extclk) == -EPROBE_DEFER) 501 return -EPROBE_DEFER; 502 } else { |
500 if (priv->extclk == priv->clk) { 501 devm_clk_put(&pdev->dev, priv->extclk); 502 priv->extclk = ERR_PTR(-EINVAL); 503 } else { 504 dev_info(&pdev->dev, "found external clock\n"); 505 clk_prepare_enable(priv->extclk); 506 soc_dai = &kirkwood_i2s_dai_extclk; 507 } --- 78 unchanged lines hidden --- | 503 if (priv->extclk == priv->clk) { 504 devm_clk_put(&pdev->dev, priv->extclk); 505 priv->extclk = ERR_PTR(-EINVAL); 506 } else { 507 dev_info(&pdev->dev, "found external clock\n"); 508 clk_prepare_enable(priv->extclk); 509 soc_dai = &kirkwood_i2s_dai_extclk; 510 } --- 78 unchanged lines hidden --- |