[PATCH 09/10] mtd: nand: Add bbt parameter
Juergen Beisert
jbe at pengutronix.de
Mon Mar 4 15:42:55 EST 2013
Sascha Hauer wrote:
> [...]
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -1688,6 +1688,23 @@ static int mtd_set_erasebad(struct device_d *dev,
> struct param_d *param, return 0;
> }
>
> +static const char *mtd_get_bbt_type(struct device_d *dev, struct param_d
*p) +{
> + struct mtd_info *mtd = container_of(dev, struct mtd_info, class_dev);
> + struct nand_chip *chip = mtd->priv;
> + char *str;
Should also be "const char *str"
> +
> + if (!chip->bbt)
> + str = "none";
> + else if ((chip->bbt_td && chip->bbt_td->pages[0] != -1) ||
> + (chip->bbt_md && chip->bbt_md->pages[0] != -1))
> + str = "flashbased";
> + else
> + str = "memorybased";
> +
> + return str;
> +}
> +
jbe
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
More information about the barebox
mailing list