| From 0625166c1d275001f450dc67cccc9b91c2940f78 Mon Sep 17 00:00:00 2001 |
| From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Date: Fri, 10 Apr 2015 08:50:12 +0000 |
| Subject: [PATCH 098/129] ASoC: rsnd: tidyup SSI parent related function/macro |
| names |
| |
| Current rsnd driver is using SSI parent related function/macro as |
| "clock" related. but it is not only clock related. |
| tidyup function/macro naming. |
| |
| Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Signed-off-by: Mark Brown <broonie@kernel.org> |
| (cherry picked from commit 8c5c79a1cd51ce1b4fec8bbaecd17d599478bd27) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| sound/soc/sh/rcar/ssi.c | 18 +++++++++++------- |
| 1 file changed, 11 insertions(+), 7 deletions(-) |
| |
| diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c |
| index 7bb9c087f3dc..2ef48a44c4ab 100644 |
| --- a/sound/soc/sh/rcar/ssi.c |
| +++ b/sound/soc/sh/rcar/ssi.c |
| @@ -80,7 +80,7 @@ struct rsnd_ssi { |
| #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) |
| #define rsnd_dma_to_ssi(dma) rsnd_mod_to_ssi(rsnd_dma_to_mod(dma)) |
| #define rsnd_ssi_pio_available(ssi) ((ssi)->info->irq > 0) |
| -#define rsnd_ssi_clk_from_parent(ssi) ((ssi)->parent) |
| +#define rsnd_ssi_parent(ssi) ((ssi)->parent) |
| #define rsnd_ssi_mode_flags(p) ((p)->info->flags) |
| #define rsnd_ssi_dai_id(ssi) ((ssi)->info->dai_id) |
| #define rsnd_ssi_of_node(priv) \ |
| @@ -189,8 +189,10 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi, |
| rsnd_mod_hw_start(&ssi->mod); |
| |
| if (rsnd_rdai_is_clk_master(rdai)) { |
| - if (rsnd_ssi_clk_from_parent(ssi)) |
| - rsnd_ssi_hw_start(ssi->parent, io); |
| + struct rsnd_ssi *ssi_parent = rsnd_ssi_parent(ssi); |
| + |
| + if (ssi_parent) |
| + rsnd_ssi_hw_start(ssi_parent, io); |
| else |
| rsnd_ssi_master_clk_start(ssi, io); |
| } |
| @@ -253,8 +255,10 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi) |
| rsnd_ssi_status_check(&ssi->mod, IIRQ); |
| |
| if (rsnd_rdai_is_clk_master(rdai)) { |
| - if (rsnd_ssi_clk_from_parent(ssi)) |
| - rsnd_ssi_hw_stop(ssi->parent); |
| + struct rsnd_ssi *ssi_parent = rsnd_ssi_parent(ssi); |
| + |
| + if (ssi_parent) |
| + rsnd_ssi_hw_stop(ssi_parent); |
| else |
| rsnd_ssi_master_clk_stop(ssi); |
| } |
| @@ -598,7 +602,7 @@ int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) |
| return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE); |
| } |
| |
| -static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) |
| +static void rsnd_ssi_parent_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) |
| { |
| if (!rsnd_ssi_is_pin_sharing(&ssi->mod)) |
| return; |
| @@ -732,7 +736,7 @@ int rsnd_ssi_probe(struct platform_device *pdev, |
| if (ret) |
| return ret; |
| |
| - rsnd_ssi_parent_clk_setup(priv, ssi); |
| + rsnd_ssi_parent_setup(priv, ssi); |
| } |
| |
| return 0; |
| -- |
| 2.6.2 |
| |