• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/mtd/ubi/

Lines Matching refs:ubi_num

225  * @ubi_num: UBI device number
228 * @ubi_num, or %NULL if the device does not exist. This function increases the
232 struct ubi_device *ubi_get_device(int ubi_num)
237 ubi = ubi_devices[ubi_num];
298 int i, ubi_num = -ENODEV;
305 ubi_num = ubi->ubi_num;
311 return ubi_num;
329 * we still can use 'ubi->ubi_num'.
332 ubi = ubi_get_device(ubi->ubi_num);
388 dev_set_name(&ubi->dev, UBI_NAME_STR"%d", ubi->ubi_num);
485 sprintf(ubi->ubi_name, UBI_NAME_STR "%d", ubi->ubi_num);
843 * @ubi_num: number to assign to the new UBI device
846 * This function attaches MTD device @mtd_dev to UBI and assign @ubi_num number
847 * to the newly created UBI device, unless @ubi_num is %UBI_DEV_NUM_AUTO, in
855 int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)
889 if (ubi_num == UBI_DEV_NUM_AUTO) {
891 for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
892 if (!ubi_devices[ubi_num])
894 if (ubi_num == UBI_MAX_DEVICES) {
900 if (ubi_num >= UBI_MAX_DEVICES)
903 /* Make sure ubi_num is not busy */
904 if (ubi_devices[ubi_num]) {
905 dbg_err("ubi%d already exists", ubi_num);
915 ubi->ubi_num = ubi_num;
924 ubi_msg("attaching mtd%d to ubi%d", mtd->index, ubi_num);
970 ubi_msg("attached mtd%d to ubi%d", mtd->index, ubi_num);
997 ubi_devices[ubi_num] = ubi;
999 return ubi_num;
1022 * @ubi_num: UBI device number to detach from
1025 * This function destroys an UBI device number @ubi_num and detaches the
1033 int ubi_detach_mtd_dev(int ubi_num, int anyway)
1037 if (ubi_num < 0 || ubi_num >= UBI_MAX_DEVICES)
1040 ubi = ubi_get_device(ubi_num);
1056 ubi_devices[ubi_num] = NULL;
1059 ubi_assert(ubi_num == ubi->ubi_num);
1061 dbg_msg("detaching mtd%d from ubi%d", ubi->mtd->index, ubi_num);
1086 ubi_msg("mtd%d is detached from ubi%d", ubi->mtd->index, ubi->ubi_num);
1243 ubi_detach_mtd_dev(ubi_devices[k]->ubi_num, 1);
1266 ubi_detach_mtd_dev(ubi_devices[i]->ubi_num, 1);