ASoC: mxs-saif: Remove platform data
Subsystems (3)
Fabio Estevam
reviewerPATCH v2 1/2 ASoC: mxs-saif: Remove platform data
From: Fabio Estevam <[email protected]>
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.
---
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 | 9 --------- 2 files changed, 25 deletions(-) delete mode 100644 include/sound/saif.h
include/sound/saif.h deleted +0 -0
sound/soc/mxs/mxs-saif.c +0 -9
@@ -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>
@@ -652,7 +651,6 @@ 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 ;
@@ -682,13 +680,6 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev)if (saif->master_id <0 )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)) {
Signature · 1 line
1.7.9.5
Quoted 42 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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]>---
Changes since v1:
- Also removemxs_saif_platform_dataandsound/saif.h, which was used only to includemxs_saif_platform_datadefinition.include/sound/saif.h | 16 ---------------- sound/soc/mxs/mxs-saif.c | 9 --------- 2 files changed, 25 deletions(-) delete mode 100644 include/sound/saif.hinclude/sound/saif.h deleted +0
-0sound/soc/mxs/mxs-saif.c +0
-2@@ -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> @@ -652,7 +651,6 @@ 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 ;
sound/soc/mxs/mxs-saif.c static int __devinit mxs_saif_probe(struct platform_device *pdev) · line 691
Quoted 10 lines
sound/soc/mxs/mxs-saif.c +0
-7@@ -682,13 +680,6 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev)if (saif->master_id <0 )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;
With the "else" block removed, the left "if (np)" does not make much sense to me. We should probably just remove it, since the only way that driver will get probed is from DT, in which case np shouldn't be NULL.
Shawn
Quoted 6 lines
sound/soc/mxs/mxs-saif.c +0
-0}if (saif->master_id <0 || saif->master_id >=ARRAY_SIZE (mxs_saif)) {Signature · 1 line
1.7.9.5