@@ -1165,9 +1165,10 @@ static int fsl_spdif_probe(struct platform_device *pdev)
}
/* Select clock source for rx/tx clock */
- spdif_priv->rxclk = devm_clk_get(&pdev->dev, "rxtx1");
+ sprintf(tmp, "rxtx%d", DEFAULT_RXCLK_SRC);
+ spdif_priv->rxclk = devm_clk_get(&pdev->dev, tmp);
if (IS_ERR(spdif_priv->rxclk)) {
- dev_err(&pdev->dev, "no rxtx1 clock in devicetree\n");
+ dev_err(&pdev->dev, "no %s clock in devicetree\n", tmp);
return PTR_ERR(spdif_priv->rxclk);
}
spdif_priv->rxclk_src = DEFAULT_RXCLK_SRC;
Then we will no longer need to change the name in dev_err() if one day we are going to change the DEFAULT_RXCLK_SRC. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> --- sound/soc/fsl/fsl_spdif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)