staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler
Subsystems (4)
PATCH 1/1 staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, as GFP_KERNEL may sleep according to slab allocator.
Signed-off-by Karim Eshapa <[email protected]>
--- drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7280a.c +1 -1
@@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)unsigned int *channels;int i, ret; - channels =kcalloc (st->scan_cnt,sizeof (*channels),GFP_KERNEL ); + channels =kcalloc (st->scan_cnt,sizeof (*channels),GFP_ATOMIC );if (!channels)return IRQ_HANDLED ;
Signature · 1 line
2.17.1
Quoted 2 lines · Karim Eshapa
Use
GFP_ATOMICratherGFP_KERNELin interrupt handler, asGFP_KERNELmay sleep according to slab allocator.
This is a threaded interrupt. Sleeping is OK.
Quoted 20 lines
Signed-off-by Karim Eshapa <[email protected]>--- drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/iio/adc/ad7280a.c +1
-1@@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)unsigned int *channels;int i, ret; - channels =kcalloc (st->scan_cnt,sizeof (*channels),GFP_KERNEL ); + channels =kcalloc (st->scan_cnt,sizeof (*channels),GFP_ATOMIC );if (!channels)return IRQ_HANDLED ;