/* This function tries to open and MTD device described by @mtd_dev string, which is first treated as an ASCII number, and if it is not true, it is treated as MTD device name. Returns MTD device description object in case of success and a negative error code in case of failure.  */
static struct mtd_info* __init open_mtd_device(const char *mtd_dev)
/* This function tries to open and MTD device described by @mtd_dev string, which is first treated as an ASCII number, and if it is not true, it is treated as MTD device name. Returns MTD device description object in case of success and a negative error code in case of failure.  */
static struct mtd_info* __init open_mtd_device(const char *mtd_dev)
{
	struct mtd_info *mtd;
	int mtd_num;
	char *endp;
	mtd_num = simple_strtoul(mtd_dev, &endp, 0);
	if (*endp != '\0' || mtd_dev == endp) {
		mtd = get_mtd_device_nm(mtd_dev);
	} else
		mtd = get_mtd_device(NULL, mtd_num);
	return mtd;
}