From: Sean Anderson Date: Mon, 5 Oct 2020 01:39:45 +0000 (-0400) Subject: mtd: mxs_nand: Fix not calling dev_xxx with a device X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=baed179d2f846a86297203545059bcd209207ca1;p=u-boot.git mtd: mxs_nand: Fix not calling dev_xxx with a device This includes device_compat.h, and fixes several calls to dev_xxx. Signed-off-by: Sean Anderson --- diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index a7852a841c..e6bbfac4d6 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -16,19 +16,20 @@ #include #include #include -#include -#include -#include -#include +#include #include -#include -#include +#include #include #include +#include +#include +#include #include #include -#include -#include +#include +#include +#include +#include #define MXS_NAND_DMA_DESCRIPTOR_COUNT 4 @@ -115,13 +116,14 @@ static uint32_t mxs_nand_aux_status_offset(void) return (MXS_NAND_METADATA_SIZE + 0x3) & ~0x3; } -static inline bool mxs_nand_bbm_in_data_chunk(struct bch_geometry *geo, struct mtd_info *mtd, - unsigned int *chunk_num) +static inline bool mxs_nand_bbm_in_data_chunk(struct bch_geometry *geo, + struct mtd_info *mtd, + unsigned int *chunk_num) { unsigned int i, j; if (geo->ecc_chunk0_size != geo->ecc_chunkn_size) { - dev_err(this->dev, "The size of chunk0 must equal to chunkn\n"); + dev_err(mtd->dev, "The size of chunk0 must equal to chunkn\n"); return false; } @@ -135,7 +137,7 @@ static inline bool mxs_nand_bbm_in_data_chunk(struct bch_geometry *geo, struct m if (j < geo->ecc_chunkn_size * 8) { *chunk_num = i + 1; - dev_dbg(this->dev, "Set ecc to %d and bbm in chunk %d\n", + dev_dbg(mtd->dev, "Set ecc to %d and bbm in chunk %d\n", geo->ecc_strength, *chunk_num); return true; } @@ -1118,7 +1120,7 @@ static int mxs_nand_set_geometry(struct mtd_info *mtd, struct bch_geometry *geo) if ((!(chip->ecc_strength_ds > 0 && chip->ecc_step_ds > 0) && mtd->oobsize < 1024) || nand_info->legacy_bch_geometry) { - dev_warn(this->dev, "use legacy bch geometry\n"); + dev_warn(mtd->dev, "use legacy bch geometry\n"); return mxs_nand_legacy_calc_ecc_layout(geo, mtd); }