Lines Matching refs:ubi_num

62 	int ubi_num;  member
258 struct ubi_device *ubi_get_device(int ubi_num) in ubi_get_device() argument
263 ubi = ubi_devices[ubi_num]; in ubi_get_device()
327 int i, ubi_num = -ENODEV; in ubi_major2num() local
334 ubi_num = ubi->ubi_num; in ubi_major2num()
340 return ubi_num; in ubi_major2num()
445 sprintf(ubi->ubi_name, UBI_NAME_STR "%d", ubi->ubi_num); in uif_init()
468 dev_set_name(&ubi->dev, UBI_NAME_STR "%d", ubi->ubi_num); in uif_init()
849 int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, in ubi_attach_mtd_dev() argument
912 if (ubi_num == UBI_DEV_NUM_AUTO) { in ubi_attach_mtd_dev()
914 for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++) in ubi_attach_mtd_dev()
915 if (!ubi_devices[ubi_num]) in ubi_attach_mtd_dev()
917 if (ubi_num == UBI_MAX_DEVICES) { in ubi_attach_mtd_dev()
923 if (ubi_num >= UBI_MAX_DEVICES) in ubi_attach_mtd_dev()
927 if (ubi_devices[ubi_num]) { in ubi_attach_mtd_dev()
928 pr_err("ubi: ubi%i already exists\n", ubi_num); in ubi_attach_mtd_dev()
944 ubi->ubi_num = ubi_num; in ubi_attach_mtd_dev()
1061 ubi_devices[ubi_num] = ubi; in ubi_attach_mtd_dev()
1063 return ubi_num; in ubi_attach_mtd_dev()
1093 int ubi_detach_mtd_dev(int ubi_num, int anyway) in ubi_detach_mtd_dev() argument
1097 if (ubi_num < 0 || ubi_num >= UBI_MAX_DEVICES) in ubi_detach_mtd_dev()
1100 ubi = ubi_get_device(ubi_num); in ubi_detach_mtd_dev()
1122 ubi_devices[ubi_num] = NULL; in ubi_detach_mtd_dev()
1125 ubi_assert(ubi_num == ubi->ubi_num); in ubi_detach_mtd_dev()
1289 err = ubi_attach_mtd_dev(mtd, p->ubi_num, in ubi_init_attach()
1323 ubi_detach_mtd_dev(ubi_devices[k]->ubi_num, 1); in ubi_init_attach()
1415 ubi_detach_mtd_dev(ubi_devices[i]->ubi_num, 1); in ubi_exit()
1538 int err = kstrtoint(token, 10, &p->ubi_num); in ubi_mtd_param_parse()
1546 p->ubi_num = UBI_DEV_NUM_AUTO; in ubi_mtd_param_parse()