Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311378 > unrolled thread

[PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type

Started byLudovic Desroches <ludovic.desroches@atmel.com>
First post2016-01-18 09:50 +0100
Last post2016-01-23 17:20 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-01-18 09:50 +0100
    [PATCH 2/2] iio:adc:at91-sama5d2: code cleanup Ludovic Desroches <ludovic.desroches@atmel.com> - 2016-01-18 09:50 +0100
      Re: [PATCH 2/2] iio:adc:at91-sama5d2: code cleanup Jonathan Cameron <jic23@kernel.org> - 2016-01-23 17:20 +0100
    Re: [PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type Jonathan Cameron <jic23@kernel.org> - 2016-01-23 17:20 +0100

#1311378 — [PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type

FromLudovic Desroches <ludovic.desroches@atmel.com>
Date2016-01-18 09:50 +0100
Subject[PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type
Message-ID<qSdFD-6xq-7@gated-at.bofh.it>
vref_uv has to be an int.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 drivers/iio/adc/at91-sama5d2_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index ecb2d90..f2d8bd5 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -171,7 +171,7 @@ struct at91_adc_state {
 	struct clk			*per_clk;
 	struct regulator		*reg;
 	struct regulator		*vref;
-	u32				vref_uv;
+	int				vref_uv;
 	const struct iio_chan_spec	*chan;
 	bool				conversion_done;
 	u32				conversion_value;
-- 
2.5.0

[toc] | [next] | [standalone]


#1311380 — [PATCH 2/2] iio:adc:at91-sama5d2: code cleanup

FromLudovic Desroches <ludovic.desroches@atmel.com>
Date2016-01-18 09:50 +0100
Subject[PATCH 2/2] iio:adc:at91-sama5d2: code cleanup
Message-ID<qSdFE-6xq-11@gated-at.bofh.it>
In reply to#1311378
Use var type for sizeof argument instead of the struct name.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 drivers/iio/adc/at91-sama5d2_adc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index f2d8bd5..dbee13a 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -353,8 +353,7 @@ static int at91_adc_probe(struct platform_device *pdev)
 	struct resource	*res;
 	int ret;
 
-	indio_dev = devm_iio_device_alloc(&pdev->dev,
-					  sizeof(struct at91_adc_state));
+	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*st));
 	if (!indio_dev)
 		return -ENOMEM;
 
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1315675 — Re: [PATCH 2/2] iio:adc:at91-sama5d2: code cleanup

FromJonathan Cameron <jic23@kernel.org>
Date2016-01-23 17:20 +0100
SubjectRe: [PATCH 2/2] iio:adc:at91-sama5d2: code cleanup
Message-ID<qU94S-5dZ-13@gated-at.bofh.it>
In reply to#1311380
On 18/01/16 08:41, Ludovic Desroches wrote:
> Use var type for sizeof argument instead of the struct name.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Applied, thanks.

Jonathan
> ---
>  drivers/iio/adc/at91-sama5d2_adc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index f2d8bd5..dbee13a 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -353,8 +353,7 @@ static int at91_adc_probe(struct platform_device *pdev)
>  	struct resource	*res;
>  	int ret;
>  
> -	indio_dev = devm_iio_device_alloc(&pdev->dev,
> -					  sizeof(struct at91_adc_state));
> +	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*st));
>  	if (!indio_dev)
>  		return -ENOMEM;
>  
> 

[toc] | [prev] | [next] | [standalone]


#1315674

FromJonathan Cameron <jic23@kernel.org>
Date2016-01-23 17:20 +0100
Message-ID<qU94S-5dZ-7@gated-at.bofh.it>
In reply to#1311378
On 18/01/16 08:41, Ludovic Desroches wrote:
> vref_uv has to be an int.
> 
Applied, with a reported-by tag for Julia added.

Thanks,

Jonathan
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>  drivers/iio/adc/at91-sama5d2_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index ecb2d90..f2d8bd5 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -171,7 +171,7 @@ struct at91_adc_state {
>  	struct clk			*per_clk;
>  	struct regulator		*reg;
>  	struct regulator		*vref;
> -	u32				vref_uv;
> +	int				vref_uv;
>  	const struct iio_chan_spec	*chan;
>  	bool				conversion_done;
>  	u32				conversion_value;
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web