diff mbox

[v4,3/6] ASoC: fsl_ssi: Save a dev reference for dev_err() purpose.

Message ID 1462277640-20052-4-git-send-email-arnaud.mouiche@invoxia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arnaud Mouiche May 3, 2016, 12:13 p.m. UTC
Most of functions only receive the ssi_private reference and don't have
a knowledge of 'dev' pointer, even for debug purpose.

Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
---
 sound/soc/fsl/fsl_ssi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Timur Tabi May 3, 2016, 12:17 p.m. UTC | #1
Arnaud Mouiche wrote:
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 1a9d0ad..695f041 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -262,6 +262,7 @@ struct fsl_ssi_private {
>   	struct fsl_ssi_dbg dbg_stats;
>
>   	const struct fsl_ssi_soc_data *soc;
> +	struct device *dev;
>   };

I don't see where this pointer is used.
Fabio Estevam May 7, 2016, 10:54 p.m. UTC | #2
On Tue, May 3, 2016 at 9:17 AM, Timur Tabi <timur@tabi.org> wrote:
> Arnaud Mouiche wrote:
>>
>> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
>> index 1a9d0ad..695f041 100644
>> --- a/sound/soc/fsl/fsl_ssi.c
>> +++ b/sound/soc/fsl/fsl_ssi.c
>> @@ -262,6 +262,7 @@ struct fsl_ssi_private {
>>         struct fsl_ssi_dbg dbg_stats;
>>
>>         const struct fsl_ssi_soc_data *soc;
>> +       struct device *dev;
>>   };
>
>
> I don't see where this pointer is used.

It is used in patch 5/6.
Caleb Crome May 10, 2016, 4:34 p.m. UTC | #3
On Tue, May 3, 2016 at 5:13 AM, Arnaud Mouiche
<arnaud.mouiche@invoxia.com> wrote:
> Most of functions only receive the ssi_private reference and don't have
> a knowledge of 'dev' pointer, even for debug purpose.
>
> Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
> ---
>  sound/soc/fsl/fsl_ssi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 1a9d0ad..695f041 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -262,6 +262,7 @@ struct fsl_ssi_private {
>         struct fsl_ssi_dbg dbg_stats;
>
>         const struct fsl_ssi_soc_data *soc;
> +       struct device *dev;
>  };
>
>  /*
> @@ -1405,6 +1406,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
>         }
>
>         ssi_private->soc = of_id->data;
> +       ssi_private->dev = &pdev->dev;
>
>         sprop = of_get_property(np, "fsl,mode", NULL);
>         if (sprop) {
> --
> 1.9.1
>
Tested-by: Caleb Crome <caleb@crome.org>
diff mbox

Patch

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 1a9d0ad..695f041 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -262,6 +262,7 @@  struct fsl_ssi_private {
 	struct fsl_ssi_dbg dbg_stats;
 
 	const struct fsl_ssi_soc_data *soc;
+	struct device *dev;
 };
 
 /*
@@ -1405,6 +1406,7 @@  static int fsl_ssi_probe(struct platform_device *pdev)
 	}
 
 	ssi_private->soc = of_id->data;
+	ssi_private->dev = &pdev->dev;
 
 	sprop = of_get_property(np, "fsl,mode", NULL);
 	if (sprop) {