[PATCH 1/2] iio:adc:at91-sama5d2: fix vref_uv type
From: Ludovic Desroches <hidden>
Date: 2016-01-18 08:41:37
Subsystems: iio subsystem and drivers, microchip sama5d2-compatible adc driver, the rest · Maintainers: Jonathan Cameron, Eugen Hristev, Linus Torvalds
4 messages, 2 authors, 2016-01-23 · open the first message on its own page
From: Ludovic Desroches <hidden>
Date: 2016-01-18 08:41:37
vref_uv has to be an int. Signed-off-by: Ludovic Desroches <redacted> --- 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
From: Ludovic Desroches <hidden>
Date: 2016-01-18 08:42:00
Use var type for sizeof argument instead of the struct name. Signed-off-by: Ludovic Desroches <redacted> --- 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
From: Jonathan Cameron <jic23@kernel.org>
Date: 2016-01-23 16:16:58
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 <redacted> --- 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;
From: Jonathan Cameron <jic23@kernel.org>
Date: 2016-01-23 16:17:27
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 <redacted>
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;