ASoC: fsi: tidyup FSIA/B settings
This patch tidyup to use fsi pointer for FSIA/B settings Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
ab6f6d8521
commit
40f9118bd1
|
@ -2009,6 +2009,7 @@ static int fsi_probe(struct platform_device *pdev)
|
||||||
struct fsi_master *master;
|
struct fsi_master *master;
|
||||||
const struct platform_device_id *id_entry;
|
const struct platform_device_id *id_entry;
|
||||||
struct sh_fsi_platform_info *info = pdev->dev.platform_data;
|
struct sh_fsi_platform_info *info = pdev->dev.platform_data;
|
||||||
|
struct fsi_priv *fsi;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -2045,22 +2046,24 @@ static int fsi_probe(struct platform_device *pdev)
|
||||||
spin_lock_init(&master->lock);
|
spin_lock_init(&master->lock);
|
||||||
|
|
||||||
/* FSI A setting */
|
/* FSI A setting */
|
||||||
master->fsia.base = master->base;
|
fsi = &master->fsia;
|
||||||
master->fsia.master = master;
|
fsi->base = master->base;
|
||||||
master->fsia.info = &info->port_a;
|
fsi->master = master;
|
||||||
fsi_handler_init(&master->fsia);
|
fsi->info = &info->port_a;
|
||||||
ret = fsi_stream_probe(&master->fsia, &pdev->dev);
|
fsi_handler_init(fsi);
|
||||||
|
ret = fsi_stream_probe(fsi, &pdev->dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&pdev->dev, "FSIA stream probe failed\n");
|
dev_err(&pdev->dev, "FSIA stream probe failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FSI B setting */
|
/* FSI B setting */
|
||||||
master->fsib.base = master->base + 0x40;
|
fsi = &master->fsib;
|
||||||
master->fsib.master = master;
|
fsi->base = master->base + 0x40;
|
||||||
master->fsib.info = &info->port_b;
|
fsi->master = master;
|
||||||
fsi_handler_init(&master->fsib);
|
fsi->info = &info->port_b;
|
||||||
ret = fsi_stream_probe(&master->fsib, &pdev->dev);
|
fsi_handler_init(fsi);
|
||||||
|
ret = fsi_stream_probe(fsi, &pdev->dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&pdev->dev, "FSIB stream probe failed\n");
|
dev_err(&pdev->dev, "FSIB stream probe failed\n");
|
||||||
goto exit_fsia;
|
goto exit_fsia;
|
||||||
|
|
Loading…
Reference in a new issue