* [PATCH] iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
@ 2016-07-11 11:54 Lars-Peter Clausen
2016-07-24 12:01 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2016-07-11 11:54 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio,
Lars-Peter Clausen
The data buffer for captured mode for the ad799x driver is allocated in the
update_scan_mode() callback. This callback is not set in the iio_info
struct for the ad7791/ad7995/ad7999, which means that the data buffer is
not allocated when a captured transfer is started. As a result the driver
crashes when the first sample is received. To fix this properly set the
update_scan_mode() callback.
Fixes: d8dca33027c1 ("staging:iio:ad799x: Preallocate sample buffer")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
Appologies if you received this twice, forgot the list on the first try.
---
drivers/iio/adc/ad799x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
index b616376..9704090 100644
--- a/drivers/iio/adc/ad799x.c
+++ b/drivers/iio/adc/ad799x.c
@@ -527,6 +527,7 @@ static struct attribute_group ad799x_event_attrs_group = {
static const struct iio_info ad7991_info = {
.read_raw = &ad799x_read_raw,
.driver_module = THIS_MODULE,
+ .update_scan_mode = ad799x_update_scan_mode,
};
static const struct iio_info ad7993_4_7_8_noirq_info = {
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
2016-07-11 11:54 [PATCH] iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999 Lars-Peter Clausen
@ 2016-07-24 12:01 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-07-24 12:01 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio
On 11/07/16 12:54, Lars-Peter Clausen wrote:
> The data buffer for captured mode for the ad799x driver is allocated in the
> update_scan_mode() callback. This callback is not set in the iio_info
> struct for the ad7791/ad7995/ad7999, which means that the data buffer is
> not allocated when a captured transfer is started. As a result the driver
> crashes when the first sample is received. To fix this properly set the
> update_scan_mode() callback.
>
> Fixes: d8dca33027c1 ("staging:iio:ad799x: Preallocate sample buffer")
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the fixes-togreg-post-rc1 branch (because fixes-togreg is
currently empty and hence this'll go upstream sooner) and marked for stable.
thanks,
Jonathan
> ---
> Appologies if you received this twice, forgot the list on the first try.
> ---
> drivers/iio/adc/ad799x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
> index b616376..9704090 100644
> --- a/drivers/iio/adc/ad799x.c
> +++ b/drivers/iio/adc/ad799x.c
> @@ -527,6 +527,7 @@ static struct attribute_group ad799x_event_attrs_group = {
> static const struct iio_info ad7991_info = {
> .read_raw = &ad799x_read_raw,
> .driver_module = THIS_MODULE,
> + .update_scan_mode = ad799x_update_scan_mode,
> };
>
> static const struct iio_info ad7993_4_7_8_noirq_info = {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-24 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-11 11:54 [PATCH] iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999 Lars-Peter Clausen
2016-07-24 12:01 ` Jonathan Cameron
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).