From: Fabio Estevam Subject: [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Date: Wed, 31 Oct 2012 13:55:25 -0200 Message-ID: <1351698925-25530-1-git-send-email-festevam@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gg0-f179.google.com (mail-gg0-f179.google.com [209.85.161.179]) by alsa0.perex.cz (Postfix) with ESMTP id DDBC226168B for ; Wed, 31 Oct 2012 16:55:36 +0100 (CET) Received: by mail-gg0-f179.google.com with SMTP id y6so288096ggc.38 for ; Wed, 31 Oct 2012 08:55:33 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: broonie@opensource.wolfsonmicro.com Cc: Fabio Estevam , alsa-devel@alsa-project.org, dong.aisheng@linaro.org, shawn.guo@linaro.org List-Id: alsa-devel@alsa-project.org From: Fabio Estevam 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 --- Changes since v2: - Also remove 'if (np)' as dt is the only probing mechanism. Changes since v1: - Also remove mxs_saif_platform_data and sound/saif.h, which was used only to include mxs_saif_platform_data definition. include/sound/saif.h | 16 ---------------- sound/soc/mxs/mxs-saif.c | 42 +++++++++++++++--------------------------- 2 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 include/sound/saif.h diff --git a/include/sound/saif.h b/include/sound/saif.h deleted file mode 100644 index f22f3e1..0000000 diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index aa037b2..ab5bdec 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -652,10 +651,9 @@ static int __devinit 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)) return -EINVAL; @@ -664,31 +662,21 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) 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)) { -- 1.7.9.5