summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@linaro.org>2025-02-23 09:51:10 +0300
committerTudor Ambarus <tudor.ambarus@linaro.org>2025-03-07 09:36:38 +0300
commit93020292fea71d62dc9749745d8ba1b44268a2fc (patch)
tree204695cf0c6e95bcadf5e0ac1a54696b6bf0891d
parent797bbaa7531f75985b199e484451fa3f954382b3 (diff)
downloadlinux-93020292fea71d62dc9749745d8ba1b44268a2fc.tar.xz
mtd: spi-nor: explicitly include <linux/math64.h>
swp and otp drivers use div_u64 and div64_u64 and rely on implicit inclusion of <linux/math64.h>. It is good practice to directly include all headers used, it avoids implicit dependencies and spurious breakage if someone rearranges headers and causes the implicit include to vanish. Include the missing header. Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Link: https://lore.kernel.org/r/20250223-snor-math64-v2-1-6f0313eea331@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
-rw-r--r--drivers/mtd/spi-nor/otp.c1
-rw-r--r--drivers/mtd/spi-nor/swp.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/otp.c b/drivers/mtd/spi-nor/otp.c
index 9a729aa3452d..7d0b145d78d8 100644
--- a/drivers/mtd/spi-nor/otp.c
+++ b/drivers/mtd/spi-nor/otp.c
@@ -6,6 +6,7 @@
*/
#include <linux/log2.h>
+#include <linux/math64.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/spi-nor.h>
diff --git a/drivers/mtd/spi-nor/swp.c b/drivers/mtd/spi-nor/swp.c
index e48c3cff247a..9c9328478d8a 100644
--- a/drivers/mtd/spi-nor/swp.c
+++ b/drivers/mtd/spi-nor/swp.c
@@ -5,6 +5,7 @@
* Copyright (C) 2005, Intec Automation Inc.
* Copyright (C) 2014, Freescale Semiconductor, Inc.
*/
+#include <linux/math64.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/spi-nor.h>