From c2034821772898b54d745e79fc96586cebaae12c Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Sat, 4 Nov 2023 16:37:49 -0400 Subject: nand: Add function to unregister NAND devices This performs the opposite of nand_register, allowing drivers to unregister nand devices. This is probably unnecessary for most regular drivers, but we expect sandbox drivers to get repeatedly bound/unbound, so this will help avoid dangling pointers. Signed-off-by: Sean Anderson Reviewed-by: Dario Binacchi --- include/nand.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/nand.h') diff --git a/include/nand.h b/include/nand.h index c1d7533aaac..fc584f5ef7a 100644 --- a/include/nand.h +++ b/include/nand.h @@ -22,6 +22,7 @@ int nand_mtd_to_devnum(struct mtd_info *mtd); #if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) void board_nand_init(void); int nand_register(int devnum, struct mtd_info *mtd); +void nand_unregister(struct mtd_info *mtd); #else struct nand_chip; -- cgit v1.2.3