/* onenand_default_bbt -  Select a default bad block table for the device  */
int onenand_default_bbt(struct mtd_info *mtd)
/* onenand_default_bbt -  Select a default bad block table for the device  */
int onenand_default_bbt(struct mtd_info *mtd)
{
	struct onenand_chip *this = mtd->priv;
	struct bbm_info *bbm;
	this->bbm = kzalloc(sizeof(struct bbm_info), GFP_KERNEL);
	if (!this->bbm)
		return -ENOMEM;
	bbm = this->bbm;
	if (!bbm->badblock_pattern)
		bbm->badblock_pattern = &largepage_memorybased;
	return onenand_scan_bbt(mtd, bbm->badblock_pattern);
}