* [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data
@ 2012-10-31 15:55 Fabio Estevam
2012-11-01 1:35 ` Shawn Guo
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Fabio Estevam @ 2012-10-31 15:55 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel, dong.aisheng, shawn.guo
From: Fabio Estevam <fabio.estevam@freescale.com>
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>
---
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 <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,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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data
2012-10-31 15:55 [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Fabio Estevam
@ 2012-11-01 1:35 ` Shawn Guo
2012-11-01 10:08 ` Dong Aisheng
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2012-11-01 1:35 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie, dong.aisheng
On Wed, Oct 31, 2012 at 01:55:25PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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: Shawn Guo <shawn.guo@linaro.org>
> ---
> 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 <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,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
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data
2012-10-31 15:55 [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Fabio Estevam
2012-11-01 1:35 ` Shawn Guo
@ 2012-11-01 10:08 ` Dong Aisheng
2012-11-01 14:30 ` Mark Brown
2012-11-01 14:30 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Dong Aisheng @ 2012-11-01 10:08 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie, shawn.guo
Hi Fabio,
On 31 October 2012 23:55, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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>
Only one minor comment, otherwise,
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
> ---
> 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 <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,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))
Can we also clean up this line?
It seems pdev->id checking is also needless after converting to dt only.
> return -EINVAL;
Regards
Dong Aisheng
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data
2012-10-31 15:55 [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Fabio Estevam
2012-11-01 1:35 ` Shawn Guo
2012-11-01 10:08 ` Dong Aisheng
@ 2012-11-01 14:30 ` Mark Brown
2012-11-01 14:30 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2012-11-01 14:30 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, dong.aisheng, shawn.guo
[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]
On Wed, Oct 31, 2012 at 01:55:25PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> All MXS users have been converted to device tree and the board files have been
> removed.
This doesn't apply against v3.7-rc3 so I wasn't able to make a topic
branch for it. Can you check what's going on here please?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data
2012-10-31 15:55 [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Fabio Estevam
` (2 preceding siblings ...)
2012-11-01 14:30 ` Mark Brown
@ 2012-11-01 14:30 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2012-11-01 14:30 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, dong.aisheng, shawn.guo
[-- Attachment #1.1: Type: text/plain, Size: 255 bytes --]
On Wed, Oct 31, 2012 at 01:55:25PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> All MXS users have been converted to device tree and the board files have been
> removed.
I also seem to be missing patch 2...
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-01 14:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 15:55 [PATCH v3 1/2] ASoC: mxs-saif: Remove platform data Fabio Estevam
2012-11-01 1:35 ` Shawn Guo
2012-11-01 10:08 ` Dong Aisheng
2012-11-01 14:30 ` Mark Brown
2012-11-01 14:30 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.