[PATCH] iio: adc: ti-ads7138: explicitly include <linux/slab.h>

From: Giorgi Tchankvetadze

Date: Fri Apr 24 2026 - 04:20:52 EST


ti-ads7138.c uses kmalloc() and kfree(), which are provided by
linux/slab.h, but does not include that header directly.
The driver currently gets these declarations through linux/i2c.h.
Include linux/slab.h explicitly instead of relying on the transitive
include.

Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx>
---
drivers/iio/adc/ti-ads7138.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/ti-ads7138.c b/drivers/iio/adc/ti-ads7138.c
index ee5c1b8e3a8e..ba1e9af92c6e 100644
--- a/drivers/iio/adc/ti-ads7138.c
+++ b/drivers/iio/adc/ti-ads7138.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
#include <linux/unaligned.h>

#include <linux/iio/events.h>
--
2.52.0