aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-11-14 15:28:58 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-08 06:23:26 -0500
commit4498a3cae5012979bbf3be2064c5ca00fe29109b (patch)
tree79355b5b75f9bf61112d8df226e17029a1b66275 /sound/soc/mxs
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff)
ASoC: mxs-saif: Remove platform data
All MXS users have been converted to device tree and the board files have been removed. No need to keep platform data in the driver. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-saif.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 365d9d27a321..752675da0658 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -32,7 +32,6 @@
32#include <sound/pcm.h> 32#include <sound/pcm.h>
33#include <sound/pcm_params.h> 33#include <sound/pcm_params.h>
34#include <sound/soc.h> 34#include <sound/soc.h>
35#include <sound/saif.h>
36#include <asm/mach-types.h> 35#include <asm/mach-types.h>
37#include <mach/hardware.h> 36#include <mach/hardware.h>
38#include <mach/mxs.h> 37#include <mach/mxs.h>
@@ -662,43 +661,32 @@ static int mxs_saif_probe(struct platform_device *pdev)
662 struct device_node *np = pdev->dev.of_node; 661 struct device_node *np = pdev->dev.of_node;
663 struct resource *iores, *dmares; 662 struct resource *iores, *dmares;
664 struct mxs_saif *saif; 663 struct mxs_saif *saif;
665 struct mxs_saif_platform_data *pdata;
666 struct pinctrl *pinctrl; 664 struct pinctrl *pinctrl;
667 int ret = 0; 665 int ret = 0;
666 struct device_node *master;
668 667
669 668 if (!np)
670 if (!np && pdev->id >= ARRAY_SIZE(mxs_saif))
671 return -EINVAL; 669 return -EINVAL;
672 670
673 saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL); 671 saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL);
674 if (!saif) 672 if (!saif)
675 return -ENOMEM; 673 return -ENOMEM;
676 674
677 if (np) { 675 saif->id = of_alias_get_id(np, "saif");
678 struct device_node *master; 676 if (saif->id < 0)
679 saif->id = of_alias_get_id(np, "saif"); 677 return saif->id;
680 if (saif->id < 0) 678 /*
681 return saif->id; 679 * If there is no "fsl,saif-master" phandle, it's a saif
682 /* 680 * master. Otherwise, it's a slave and its phandle points
683 * If there is no "fsl,saif-master" phandle, it's a saif 681 * to the master.
684 * master. Otherwise, it's a slave and its phandle points 682 */
685 * to the master. 683 master = of_parse_phandle(np, "fsl,saif-master", 0);
686 */ 684 if (!master) {
687 master = of_parse_phandle(np, "fsl,saif-master", 0); 685 saif->master_id = saif->id;
688 if (!master) {
689 saif->master_id = saif->id;
690 } else {
691 saif->master_id = of_alias_get_id(master, "saif");
692 if (saif->master_id < 0)
693 return saif->master_id;
694 }
695 } else { 686 } else {
696 saif->id = pdev->id; 687 saif->master_id = of_alias_get_id(master, "saif");
697 pdata = pdev->dev.platform_data; 688 if (saif->master_id < 0)
698 if (pdata && !pdata->master_mode) 689 return saif->master_id;
699 saif->master_id = pdata->master_id;
700 else
701 saif->master_id = saif->id;
702 } 690 }
703 691
704 if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) { 692 if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) {