ASoC: sh: rz-ssi: Trivial fixes

Merge series from Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>:

This patch series aims to fix trivial issues found in rz-ssi driver.
This commit is contained in:
Mark Brown 2022-04-27 23:01:24 +01:00
Родитель 87e291075d 767e6f2620
Коммит 3838bf828b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
1 изменённых файлов: 13 добавлений и 11 удалений

Просмотреть файл

@ -59,9 +59,7 @@
#define SSIFSR_RDC_MASK 0x3f #define SSIFSR_RDC_MASK 0x3f
#define SSIFSR_RDC_SHIFT 8 #define SSIFSR_RDC_SHIFT 8
#define SSIFSR_TDC(x) (((x) & 0x1f) << 24)
#define SSIFSR_TDE BIT(16) #define SSIFSR_TDE BIT(16)
#define SSIFSR_RDC(x) (((x) & 0x1f) << 8)
#define SSIFSR_RDF BIT(0) #define SSIFSR_RDF BIT(0)
#define SSIOFR_LRCONT BIT(8) #define SSIOFR_LRCONT BIT(8)
@ -978,22 +976,24 @@ static int rz_ssi_probe(struct platform_device *pdev)
/* Error Interrupt */ /* Error Interrupt */
ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); ssi->irq_int = platform_get_irq_byname(pdev, "int_req");
if (ssi->irq_int < 0) if (ssi->irq_int < 0) {
return dev_err_probe(&pdev->dev, -ENODEV, rz_ssi_release_dma_channels(ssi);
"Unable to get SSI int_req IRQ\n"); return ssi->irq_int;
}
ret = devm_request_irq(&pdev->dev, ssi->irq_int, &rz_ssi_interrupt, ret = devm_request_irq(&pdev->dev, ssi->irq_int, &rz_ssi_interrupt,
0, dev_name(&pdev->dev), ssi); 0, dev_name(&pdev->dev), ssi);
if (ret < 0) if (ret < 0) {
rz_ssi_release_dma_channels(ssi);
return dev_err_probe(&pdev->dev, ret, return dev_err_probe(&pdev->dev, ret,
"irq request error (int_req)\n"); "irq request error (int_req)\n");
}
if (!rz_ssi_is_dma_enabled(ssi)) { if (!rz_ssi_is_dma_enabled(ssi)) {
/* Tx and Rx interrupts (pio only) */ /* Tx and Rx interrupts (pio only) */
ssi->irq_tx = platform_get_irq_byname(pdev, "dma_tx"); ssi->irq_tx = platform_get_irq_byname(pdev, "dma_tx");
if (ssi->irq_tx < 0) if (ssi->irq_tx < 0)
return dev_err_probe(&pdev->dev, -ENODEV, return ssi->irq_tx;
"Unable to get SSI dma_tx IRQ\n");
ret = devm_request_irq(&pdev->dev, ssi->irq_tx, ret = devm_request_irq(&pdev->dev, ssi->irq_tx,
&rz_ssi_interrupt, 0, &rz_ssi_interrupt, 0,
@ -1004,8 +1004,7 @@ static int rz_ssi_probe(struct platform_device *pdev)
ssi->irq_rx = platform_get_irq_byname(pdev, "dma_rx"); ssi->irq_rx = platform_get_irq_byname(pdev, "dma_rx");
if (ssi->irq_rx < 0) if (ssi->irq_rx < 0)
return dev_err_probe(&pdev->dev, -ENODEV, return ssi->irq_rx;
"Unable to get SSI dma_rx IRQ\n");
ret = devm_request_irq(&pdev->dev, ssi->irq_rx, ret = devm_request_irq(&pdev->dev, ssi->irq_rx,
&rz_ssi_interrupt, 0, &rz_ssi_interrupt, 0,
@ -1016,13 +1015,16 @@ static int rz_ssi_probe(struct platform_device *pdev)
} }
ssi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); ssi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
if (IS_ERR(ssi->rstc)) if (IS_ERR(ssi->rstc)) {
rz_ssi_release_dma_channels(ssi);
return PTR_ERR(ssi->rstc); return PTR_ERR(ssi->rstc);
}
reset_control_deassert(ssi->rstc); reset_control_deassert(ssi->rstc);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
ret = pm_runtime_resume_and_get(&pdev->dev); ret = pm_runtime_resume_and_get(&pdev->dev);
if (ret < 0) { if (ret < 0) {
rz_ssi_release_dma_channels(ssi);
pm_runtime_disable(ssi->dev); pm_runtime_disable(ssi->dev);
reset_control_assert(ssi->rstc); reset_control_assert(ssi->rstc);
return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n"); return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n");