diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-12-27 19:15:08 -0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-03 12:49:54 +0000 |
commit | fd974e52dbbdb27910d40d8feea7000f26545683 (patch) | |
tree | b1c4c53fb17448d2f24e5addb0a631818ac5a57c /sound/soc/sh | |
parent | 5d0bfc5eb9f57b319d7cd6a1d5543c8287c77812 (diff) | |
download | linux-fd974e52dbbdb27910d40d8feea7000f26545683.tar.gz linux-fd974e52dbbdb27910d40d8feea7000f26545683.tar.bz2 linux-fd974e52dbbdb27910d40d8feea7000f26545683.zip |
ASoC: fsi: don't use platform info pointer on probe()
Current FSI driver is using platform info pointer,
but it is not good design for DT support.
This patch made it not to use platform info pointer.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/fsi.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index f14c611b38c6..ef34ef8e92ed 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1918,16 +1918,15 @@ static int fsi_probe(struct platform_device *pdev) { struct fsi_master *master; const struct platform_device_id *id_entry; - struct sh_fsi_platform_info *info = pdev->dev.platform_data; - struct sh_fsi_port_info nul_info, *pinfo; + struct sh_fsi_platform_info info; struct fsi_priv *fsi; struct resource *res; unsigned int irq; int ret; - nul_info.flags = 0; - nul_info.tx_id = 0; - nul_info.rx_id = 0; + memset(&info, 0, sizeof(info)); + if (pdev->dev.platform_data) + memcpy(&info, pdev->dev.platform_data, sizeof(info)); id_entry = pdev->id_entry; if (!id_entry) { @@ -1961,12 +1960,11 @@ static int fsi_probe(struct platform_device *pdev) spin_lock_init(&master->lock); /* FSI A setting */ - pinfo = (info) ? &info->port_a : &nul_info; fsi = &master->fsia; fsi->base = master->base; fsi->master = master; - fsi_port_info_init(fsi, pinfo); - fsi_handler_init(fsi, pinfo); + fsi_port_info_init(fsi, &info.port_a); + fsi_handler_init(fsi, &info.port_a); ret = fsi_stream_probe(fsi, &pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "FSIA stream probe failed\n"); @@ -1974,12 +1972,11 @@ static int fsi_probe(struct platform_device *pdev) } /* FSI B setting */ - pinfo = (info) ? &info->port_b : &nul_info; fsi = &master->fsib; fsi->base = master->base + 0x40; fsi->master = master; - fsi_port_info_init(fsi, pinfo); - fsi_handler_init(fsi, pinfo); + fsi_port_info_init(fsi, &info.port_b); + fsi_handler_init(fsi, &info.port_b); ret = fsi_stream_probe(fsi, &pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "FSIB stream probe failed\n"); |