Commit 4498a3ca authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarDong Aisheng <dong.aisheng@linaro.org>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d1c3ed66
/*
* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __SOUND_SAIF_H__
#define __SOUND_SAIF_H__
struct mxs_saif_platform_data {
bool master_mode; /* if true use master mode */
int master_id; /* id of the master if in slave mode */
};
#endif
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
#include <sound/soc.h> #include <sound/soc.h>
#include <sound/saif.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/mxs.h> #include <mach/mxs.h>
...@@ -662,20 +661,17 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -662,20 +661,17 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct resource *iores, *dmares; struct resource *iores, *dmares;
struct mxs_saif *saif; struct mxs_saif *saif;
struct mxs_saif_platform_data *pdata;
struct pinctrl *pinctrl; struct pinctrl *pinctrl;
int ret = 0; int ret = 0;
struct device_node *master;
if (!np)
if (!np && pdev->id >= ARRAY_SIZE(mxs_saif))
return -EINVAL; return -EINVAL;
saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL); saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL);
if (!saif) if (!saif)
return -ENOMEM; return -ENOMEM;
if (np) {
struct device_node *master;
saif->id = of_alias_get_id(np, "saif"); saif->id = of_alias_get_id(np, "saif");
if (saif->id < 0) if (saif->id < 0)
return saif->id; return saif->id;
...@@ -692,14 +688,6 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -692,14 +688,6 @@ static int mxs_saif_probe(struct platform_device *pdev)
if (saif->master_id < 0) if (saif->master_id < 0)
return saif->master_id; return saif->master_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;
}
if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) { if (saif->master_id < 0 || saif->master_id >= ARRAY_SIZE(mxs_saif)) {
dev_err(&pdev->dev, "get wrong master id\n"); dev_err(&pdev->dev, "get wrong master id\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment