[PATCH 12/19] memory: atmel-ebi: use generic devm_kzalloc()

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Oct 28 02:14:46 PDT 2026


From: Ahmad Fatoum <a.fatoum at barebox.org>

Now that <linux/device.h> provides a real devm_kzalloc(), drop the local
stand-in.

Assisted-by: Claude:fable-5.1
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 drivers/memory/atmel-ebi.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 293c3d7f9d56..6a1cbfcd35a5 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -15,6 +15,7 @@
 #include <driver.h>
 #include <of_device.h>
 #include <linux/regmap.h>
+#include <linux/device.h>
 #include <soc/at91/atmel-sfr.h>
 #include <linux/time.h>
 #include <linux/printk.h>
@@ -79,11 +80,6 @@ struct atmel_smc_timing_xlate {
 #define ATMEL_SMC_CYCLE_XLATE(nm, pos)	\
 	{ .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos}
 
-static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t flags)
-{
-	return kzalloc(size, flags);
-}
-
 static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid,
 				    struct atmel_ebi_dev_config *conf)
 {
-- 
2.47.3




More information about the barebox mailing list