diff mbox series

[-next] mtd: spi-nor: core: fix implicit declaration warning

Message ID 20220923031457.56103-1-zengheng4@huawei.com
State Accepted
Delegated to: Ambarus Tudor
Headers show
Series [-next] mtd: spi-nor: core: fix implicit declaration warning | expand

Commit Message

Zeng Heng Sept. 23, 2022, 3:14 a.m. UTC
spi-nor/core.c needs to include linux/delay.h,
or it would raise below compile warning:

drivers/mtd/spi-nor/core.c: In function ‘spi_nor_soft_reset’:
drivers/mtd/spi-nor/core.c:2779:2: error: implicit declaration of function ‘usleep_range’ [-Werror=implicit-function-declaration]
 2779 |  usleep_range(SPI_NOR_SRST_SLEEP_MIN, SPI_NOR_SRST_SLEEP_MAX);
      |  ^~~~~~~~~~~~

Fixes: d73ee7534cc5 ("mtd: spi-nor: core: perform a Soft Reset on shutdown")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 drivers/mtd/spi-nor/core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tudor Ambarus Jan. 31, 2023, 8:57 a.m. UTC | #1
On 23.09.2022 06:14, Zeng Heng wrote:
> spi-nor/core.c needs to include linux/delay.h,
> or it would raise below compile warning:
> 
> drivers/mtd/spi-nor/core.c: In function ‘spi_nor_soft_reset’:
> drivers/mtd/spi-nor/core.c:2779:2: error: implicit declaration of function ‘usleep_range’ [-Werror=implicit-function-declaration]
>   2779 |  usleep_range(SPI_NOR_SRST_SLEEP_MIN, SPI_NOR_SRST_SLEEP_MAX);
>        |  ^~~~~~~~~~~~
> 
> Fixes: d73ee7534cc5 ("mtd: spi-nor: core: perform a Soft Reset on shutdown")
> Signed-off-by: Zeng Heng <zengheng4@huawei.com>

Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git, 
spi-nor/next branch.

Thanks,
ta
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index f2c64006f8d7..7b365294a2f0 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -15,6 +15,7 @@ 
 #include <linux/math64.h>
 #include <linux/sizes.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/of_platform.h>