mtd: flashchip: explicitly include <linux/wait.h>
authorTudor Ambarus <tudor.ambarus@linaro.org>
Mon, 5 Feb 2024 10:09:55 +0000 (12:09 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 5 Feb 2024 13:27:07 +0000 (14:27 +0100)
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
include/linux/mtd/flashchip.h

index c04f690871ca18f5f15cd9c4e8cfee3b4ef77d0f..9798c1a1d3b6514d91b83d9e55fff8c5e9451d5d 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include <linux/sched.h>
 #include <linux/mutex.h>
+#include <linux/wait.h>
 
 typedef enum {
        FL_READY,