diff options
Diffstat (limited to 'drivers/mtd')
50 files changed, 76 insertions, 8 deletions
diff --git a/drivers/mtd/hbmc-am654.c b/drivers/mtd/hbmc-am654.c index 5a560f1253..846b0e832b 100644 --- a/drivers/mtd/hbmc-am654.c +++ b/drivers/mtd/hbmc-am654.c @@ -8,6 +8,7 @@ #include <dm.h> #include <regmap.h> #include <syscon.h> +#include <dm/device_compat.h> #define FSS_SYSC_REG 0x4 diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c index 8aeccb016d..db20a6b0b2 100644 --- a/drivers/mtd/mtd_uboot.c +++ b/drivers/mtd/mtd_uboot.c @@ -5,8 +5,10 @@ */ #include <common.h> #include <env.h> +#include <malloc.h> #include <dm/device.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <mtd.h> diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 592f58dcd3..5621c3fd26 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -10,6 +10,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index dd04d676d5..f8d3f4d246 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -9,6 +9,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/ptrace.h> @@ -1179,10 +1180,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section, if (!mtd || section < 0) return -EINVAL; - if (!mtd->ooblayout || !mtd->ooblayout->free) + if (!mtd->ooblayout || !mtd->ooblayout->rfree) return -ENOTSUPP; - return mtd->ooblayout->free(mtd, section, oobfree); + return mtd->ooblayout->rfree(mtd, section, oobfree); } EXPORT_SYMBOL_GPL(mtd_ooblayout_free); diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index fd8d8e5ea7..56acdbf65b 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -9,6 +9,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c index f3d05e6757..133670cb19 100644 --- a/drivers/mtd/nand/bbt.c +++ b/drivers/mtd/nand/bbt.c @@ -10,6 +10,7 @@ #define pr_fmt(fmt) "nand-bbt: " fmt #include <common.h> +#include <dm/devres.h> #include <linux/mtd/nand.h> #ifndef __UBOOT__ #include <linux/slab.h> diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c index 3abaef23c5..bc0accf8c6 100644 --- a/drivers/mtd/nand/core.c +++ b/drivers/mtd/nand/core.c @@ -11,6 +11,7 @@ #include <common.h> #ifndef __UBOOT__ +#include <linux/compat.h> #include <linux/module.h> #endif #include <linux/mtd/nand.h> diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c index 31ad2cfa88..996d3dbb71 100644 --- a/drivers/mtd/nand/raw/atmel_nand.c +++ b/drivers/mtd/nand/raw/atmel_nand.c @@ -13,6 +13,8 @@ #include <common.h> #include <asm/gpio.h> #include <asm/arch/gpio.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <malloc.h> #include <nand.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c index 16b0d4440a..ea7c65a1f6 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c index ece944485c..3a136155dd 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c index 3586baa4fa..6aca011db2 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 0745929253..5232328e1e 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -17,6 +17,9 @@ #include <memalign.h> #include <nand.h> #include <clk.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/ioport.h> #include <linux/completion.h> #include <linux/errno.h> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c index 883948355c..c58679834e 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0+ #include <common.h> +#include <malloc.h> +#include <dm/devres.h> #include "brcmnand_compat.h" static char *devm_kvasprintf(struct udevice *dev, gfp_t gfp, const char *fmt, diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index be1b3627ad..f51d3e25c7 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -7,9 +7,13 @@ #include <asm/dma-mapping.h> #include <dm.h> +#include <malloc.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <linux/bitfield.h> #include <linux/dma-direction.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/mtd/mtd.h> @@ -1156,7 +1160,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .free = denali_ooblayout_free, + .rfree = denali_ooblayout_free, }; static int denali_multidev_fixup(struct denali_nand_info *denali) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index 759ad40e51..41b93e660a 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -6,6 +6,7 @@ #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/io.h> #include <linux/ioport.h> #include <linux/printk.h> diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index cbf689af63..0c1bd7b474 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -11,6 +11,7 @@ #include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index e2419e18a9..cf20238782 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -10,6 +10,7 @@ #include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index 975a91a37d..a653dfa5ed 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -7,6 +7,7 @@ #include <nand.h> #include <malloc.h> #include <mxs_nand.h> +#include <linux/err.h> static struct mtd_info *mtd; static struct nand_chip nand_chip; diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index aba8ac019d..49d5e261b5 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -34,6 +34,7 @@ #endif #include <malloc.h> #include <watchdog.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c index ba785c5d53..a6e6e0ef6d 100644 --- a/drivers/mtd/nand/raw/nand_bbt.c +++ b/drivers/mtd/nand/raw/nand_bbt.c @@ -59,6 +59,7 @@ #include <common.h> #include <malloc.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/bbm.h> diff --git a/drivers/mtd/nand/raw/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c index afa0418168..11a22e021d 100644 --- a/drivers/mtd/nand/raw/nand_bch.c +++ b/drivers/mtd/nand/raw/nand_bch.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <dm/devres.h> /*#include <asm/io.h>*/ #include <linux/types.h> diff --git a/drivers/mtd/nand/raw/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c index c0545a4fb1..e6aa790391 100644 --- a/drivers/mtd/nand/raw/nand_timings.c +++ b/drivers/mtd/nand/raw/nand_timings.c @@ -9,6 +9,7 @@ * */ #include <common.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c index fc2235c1a0..f3c8f7f2cb 100644 --- a/drivers/mtd/nand/raw/nand_util.c +++ b/drivers/mtd/nand/raw/nand_util.c @@ -24,6 +24,7 @@ #include <malloc.h> #include <memalign.h> #include <div64.h> +#include <dm/devres.h> #include <linux/errno.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c index 4d2712df4c..03f210bdb0 100644 --- a/drivers/mtd/nand/raw/pxa3xx_nand.c +++ b/drivers/mtd/nand/raw/pxa3xx_nand.c @@ -10,6 +10,9 @@ #include <malloc.h> #include <fdtdec.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/cpu.h> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index f3179cc21f..1c212daa1d 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -9,6 +9,7 @@ #include <dm.h> #include <nand.h> #include <reset.h> +#include <linux/err.h> #include <linux/iopoll.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 3ccb168d13..9b99be10e6 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -26,8 +26,12 @@ #include <common.h> #include <fdtdec.h> +#include <malloc.h> #include <memalign.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c index 74acdfb308..ae699d1da5 100644 --- a/drivers/mtd/nand/raw/tegra_nand.c +++ b/drivers/mtd/nand/raw/tegra_nand.c @@ -13,6 +13,7 @@ #include <asm/arch/clock.h> #include <asm/arch/funcmux.h> #include <asm/arch-tegra/clk_rst.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <asm/gpio.h> #include <fdtdec.h> diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index 3326c2b096..52c8a94778 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -23,6 +23,7 @@ #include <common.h> #include <malloc.h> +#include <dm/device_compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index cb8ffa3fa9..cd624ec6ae 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -24,6 +24,8 @@ #include <errno.h> #include <spi.h> #include <spi-mem.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <linux/mtd/spinand.h> #endif @@ -1021,7 +1023,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .free = spinand_noecc_ooblayout_free, + .rfree = spinand_noecc_ooblayout_free, }; static int spinand_init(struct spinand_device *spinand) diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c index 3681c5eed9..0b228dcb5b 100644 --- a/drivers/mtd/nand/spi/gigadevice.c +++ b/drivers/mtd/nand/spi/gigadevice.c @@ -7,6 +7,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -103,7 +104,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand, static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .free = gd5fxgq4xexxg_ooblayout_free, + .rfree = gd5fxgq4xexxg_ooblayout_free, }; static const struct spinand_info gigadevice_spinand_table[] = { diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 662c561e50..67d092be2c 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -6,6 +6,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -47,7 +48,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .free = mx35lfxge4ab_ooblayout_free, + .rfree = mx35lfxge4ab_ooblayout_free, }; static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr) diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c index 83951c5d0f..687306e33e 100644 --- a/drivers/mtd/nand/spi/micron.c +++ b/drivers/mtd/nand/spi/micron.c @@ -7,6 +7,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -63,7 +64,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .free = mt29f2g01abagd_ooblayout_free, + .rfree = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand, diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 6ba8bc5c7b..6ede98c85d 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -8,6 +8,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -59,7 +60,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .free = w25m02gv_ooblayout_free, + .rfree = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand, diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 371e2ecaa7..693bb78b87 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -21,6 +21,7 @@ #include <common.h> #include <watchdog.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include "linux/mtd/flashchip.h" diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c index f5c6515c9b..fc2aa22d7f 100644 --- a/drivers/mtd/renesas_rpc_hf.c +++ b/drivers/mtd/renesas_rpc_hf.c @@ -8,9 +8,11 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <dm/of_access.h> #include <errno.h> #include <fdt_support.h> diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index c6107522be..5ebcca590a 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <malloc.h> #include <spi.h> #include <spi_flash.h> #include <dm/device-internal.h> diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index d7020c190b..7b6ad495ac 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -10,6 +10,8 @@ */ #include <common.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/log2.h> diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index c19d468d62..ccc0ab07af 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <dm/device_compat.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/log2.h> diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 19defd8831..f02a06fc35 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -70,6 +70,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/crc32.h> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 42c5270c7f..7de65bc7c3 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -17,6 +17,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/stringify.h> diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c index f3d348da83..d2b7ca5e33 100644 --- a/drivers/mtd/ubi/debug.c +++ b/drivers/mtd/ubi/debug.c @@ -6,10 +6,12 @@ */ #include <hexdump.h> +#include <malloc.h> #include <ubi_uboot.h> #include "ubi.h" #ifndef __UBOOT__ #include <linux/debugfs.h> +#include <linux/err.h> #include <linux/uaccess.h> #include <linux/module.h> #endif diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 0c8b998e7e..8428278e21 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -29,6 +29,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/crc32.h> #include <u-boot/crc.h> diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 646c778e87..a3f5e3e1a9 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -7,7 +7,9 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> +#include <linux/err.h> #include <u-boot/crc.h> #else #include <div64.h> diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 608dede492..8ba22d8142 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -74,6 +74,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/err.h> #include <linux/slab.h> diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index bcea71b1b2..41680cdad1 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c @@ -8,6 +8,7 @@ /* This file mostly implements UBI kernel API functions */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/namei.h> diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c index 685324d7d2..3f7ee59c94 100644 --- a/drivers/mtd/ubi/misc.c +++ b/drivers/mtd/ubi/misc.c @@ -7,6 +7,7 @@ /* Here we keep miscellaneous functions which are used all over the UBI code */ +#include <malloc.h> #include <ubi_uboot.h> #include "ubi.h" diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c index d0a6a1bd18..0f7951c859 100644 --- a/drivers/mtd/ubi/upd.c +++ b/drivers/mtd/ubi/upd.c @@ -26,6 +26,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/uaccess.h> #else #include <div64.h> diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index a2ff1b5769..2114abbe7c 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -11,6 +11,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/export.h> diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 9c46ef6695..123c2f344d 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -46,6 +46,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/err.h> #include <linux/slab.h> diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 89ca90feb3..4038b7f04e 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -86,6 +86,7 @@ */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/crc32.h> #include <linux/freezer.h> |