Skip to content

Commit

Permalink
ASoC: mxs-saif: Remove platform data
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Dong Aisheng <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Fabio Estevam authored and broonie committed Jan 8, 2013
1 parent d1c3ed6 commit 4498a3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 44 deletions.
16 changes: 0 additions & 16 deletions include/sound/saif.h

This file was deleted.

44 changes: 16 additions & 28 deletions sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/saif.h>
#include <asm/mach-types.h>
#include <mach/hardware.h>
#include <mach/mxs.h>
Expand Down Expand Up @@ -662,43 +661,32 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct resource *iores, *dmares;
struct mxs_saif *saif;
struct mxs_saif_platform_data *pdata;
struct pinctrl *pinctrl;
int ret = 0;
struct device_node *master;


if (!np && pdev->id >= ARRAY_SIZE(mxs_saif))
if (!np)
return -EINVAL;

saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL);
if (!saif)
return -ENOMEM;

if (np) {
struct device_node *master;
saif->id = of_alias_get_id(np, "saif");
if (saif->id < 0)
return saif->id;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master = of_parse_phandle(np, "fsl,saif-master", 0);
if (!master) {
saif->master_id = saif->id;
} else {
saif->master_id = of_alias_get_id(master, "saif");
if (saif->master_id < 0)
return saif->master_id;
}
saif->id = of_alias_get_id(np, "saif");
if (saif->id < 0)
return saif->id;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master = of_parse_phandle(np, "fsl,saif-master", 0);
if (!master) {
saif->master_id = saif->id;
} else {
saif->id = pdev->id;
pdata = pdev->dev.platform_data;
if (pdata && !pdata->master_mode)
saif->master_id = pdata->master_id;
else
saif->master_id = saif->id;
saif->master_id = of_alias_get_id(master, "saif");
if (saif->master_id < 0)
return saif->master_id;
}

if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) {
Expand Down

0 comments on commit 4498a3c

Please sign in to comment.