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

Subsystems: iio subsystem and drivers, microchip sama5d2-compatible adc driver, the rest · Maintainers: Jonathan Cameron, Eugen Hristev, Linus Torvalds

STALE3930d

4 messages, 2 authors, 2016-01-23 · open the first message on its own page

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

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

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

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

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

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
quoted hunk
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;

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

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
quoted hunk
---
 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;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help