devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] iio: adc: mcp320x: Fix NULL pointer.
@ 2015-07-22 16:04 Denis Carikli
       [not found] ` <1437581064-9733-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Denis Carikli @ 2015-07-22 16:04 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring
  Cc: Eric Bénard, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Denis Carikli

Without that fix, adc->chip_info is NULL in mcp320x_read_raw

Signed-off-by: Denis Carikli <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
---
 drivers/iio/adc/mcp320x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
index 8d9c9b9..fccb2dc 100644
--- a/drivers/iio/adc/mcp320x.c
+++ b/drivers/iio/adc/mcp320x.c
@@ -299,6 +299,7 @@ static int mcp320x_probe(struct spi_device *spi)
 	indio_dev->channels = chip_info->channels;
 	indio_dev->num_channels = chip_info->num_channels;
 
+	adc->chip_info = chip_info;
 	adc->transfer[0].tx_buf = &adc->tx_buf;
 	adc->transfer[0].len = sizeof(adc->tx_buf);
 	adc->transfer[1].rx_buf = adc->rx_buf;
-- 
2.4.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-02 17:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 16:04 [PATCH 1/4] iio: adc: mcp320x: Fix NULL pointer Denis Carikli
     [not found] ` <1437581064-9733-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-07-22 16:04   ` [PATCH 2/4] iio: adc: ti-adc128s052: Add adc108s022 ID Denis Carikli
     [not found]     ` <1437581064-9733-2-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-07-22 17:24       ` Michael Welling
2015-08-02 17:01       ` Jonathan Cameron
2015-07-22 16:04   ` [PATCH 3/4] iio: ti-adc128s052: Documentation: " Denis Carikli
     [not found]     ` <1437581064-9733-3-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-08-02 17:01       ` Jonathan Cameron
2015-07-22 16:04   ` [PATCH 4/4] iio: adc: ti-adc128s052: Add devicetree support Denis Carikli
     [not found]     ` <1437581064-9733-4-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2015-08-02 17:01       ` Jonathan Cameron
2015-07-22 17:18   ` [PATCH 1/4] iio: adc: mcp320x: Fix NULL pointer Michael Welling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).