Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: flashchip: explicitly include <linux/wait.h>

While reviewing the hyperbus sfdp proposal the following problem was
noticed:

In file included from ./include/linux/mtd/gen_probe.h:10,
from drivers/mtd/hyperbus/hyperbus-sfdp.c:6:
./include/linux/mtd/flashchip.h:77:9: error: unknown type name ‘wait_queue_head_t’
77 | wait_queue_head_t wq; /* Wait on here when we're waiting for the chip
| ^~~~~~~~~~~~~~~~~

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.

Explicitly include <linux/wait.h> in include/linux/mtd/flashchip.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240205100955.149755-1-tudor.ambarus@linaro.org

authored by

Tudor Ambarus and committed by
Miquel Raynal
18af7e35 0d9a4164

+1
+1
include/linux/mtd/flashchip.h
··· 13 13 */ 14 14 #include <linux/sched.h> 15 15 #include <linux/mutex.h> 16 + #include <linux/wait.h> 16 17 17 18 typedef enum { 18 19 FL_READY,