File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -586,15 +586,6 @@ struct at91_adc_temp {
586
586
u16 saved_oversampling ;
587
587
};
588
588
589
- /*
590
- * Buffer size requirements:
591
- * No channels * bytes_per_channel(2) + timestamp bytes (8)
592
- * Divided by 2 because we need half words.
593
- * We assume 32 channels for now, has to be increased if needed.
594
- * Nobody minds a buffer being too big.
595
- */
596
- #define AT91_BUFFER_MAX_HWORDS ((32 * 2 + 8) / 2)
597
-
598
589
struct at91_adc_state {
599
590
void __iomem * base ;
600
591
int irq ;
@@ -616,8 +607,8 @@ struct at91_adc_state {
616
607
struct at91_adc_temp temp_st ;
617
608
struct iio_dev * indio_dev ;
618
609
struct device * dev ;
619
- /* Ensure naturally aligned timestamp */
620
- u16 buffer [ AT91_BUFFER_MAX_HWORDS ] __aligned ( 8 );
610
+ /* We assume 32 channels for now, has to be increased if needed. */
611
+ IIO_DECLARE_BUFFER_WITH_TS ( u16 , buffer , 32 );
621
612
/*
622
613
* lock to prevent concurrent 'single conversion' requests through
623
614
* sysfs.
You can’t perform that action at this time.
0 commit comments