File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,10 @@ struct ad7768_state {
167
167
* transfer buffers to live in their own cache lines.
168
168
*/
169
169
union {
170
+ struct {
171
+ __be32 chan ;
172
+ s64 timestamp ;
173
+ } scan ;
170
174
__be32 d32 ;
171
175
u8 d8 [2 ];
172
176
} data ____cacheline_aligned ;
@@ -469,11 +473,11 @@ static irqreturn_t ad7768_trigger_handler(int irq, void *p)
469
473
470
474
mutex_lock (& st -> lock );
471
475
472
- ret = spi_read (st -> spi , & st -> data .d32 , 3 );
476
+ ret = spi_read (st -> spi , & st -> data .scan . chan , 3 );
473
477
if (ret < 0 )
474
478
goto err_unlock ;
475
479
476
- iio_push_to_buffers_with_timestamp (indio_dev , & st -> data .d32 ,
480
+ iio_push_to_buffers_with_timestamp (indio_dev , & st -> data .scan ,
477
481
iio_get_time_ns (indio_dev ));
478
482
479
483
iio_trigger_notify_done (indio_dev -> trig );
You can’t perform that action at this time.
0 commit comments