diff options
author | Dmitry Pervushin <dpervushin@embeddedalley.com> | 2009-04-29 11:29:44 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-06-02 06:53:35 -0400 |
commit | 518ceef0c9ca97023e45ae46aedaefa240c690a6 (patch) | |
tree | 6086ce9a6177bd0e4ef4da50e0205bbc8a5e5cc3 /drivers/mtd/ubi/vmt.c | |
parent | 0e0ee1cc33de8f0cc603269b354085dee340afa0 (diff) |
UBI: remove built-in gluebi
Remove built-in gluebi support. This is a preparation for a
standalone glubi module support
Signed-off-by: Dmitry Pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index e151862a3a98..ab64cb56df6e 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -317,10 +317,6 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
317 | goto out_mapping; | 317 | goto out_mapping; |
318 | } | 318 | } |
319 | 319 | ||
320 | err = ubi_create_gluebi(ubi, vol); | ||
321 | if (err) | ||
322 | goto out_cdev; | ||
323 | |||
324 | vol->dev.release = vol_release; | 320 | vol->dev.release = vol_release; |
325 | vol->dev.parent = &ubi->dev; | 321 | vol->dev.parent = &ubi->dev; |
326 | vol->dev.devt = dev; | 322 | vol->dev.devt = dev; |
@@ -330,7 +326,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) | |||
330 | err = device_register(&vol->dev); | 326 | err = device_register(&vol->dev); |
331 | if (err) { | 327 | if (err) { |
332 | ubi_err("cannot register device"); | 328 | ubi_err("cannot register device"); |
333 | goto out_gluebi; | 329 | goto out_cdev; |
334 | } | 330 | } |
335 | 331 | ||
336 | err = volume_sysfs_init(ubi, vol); | 332 | err = volume_sysfs_init(ubi, vol); |
@@ -375,10 +371,6 @@ out_sysfs: | |||
375 | do_free = 0; | 371 | do_free = 0; |
376 | get_device(&vol->dev); | 372 | get_device(&vol->dev); |
377 | volume_sysfs_close(vol); | 373 | volume_sysfs_close(vol); |
378 | out_gluebi: | ||
379 | if (ubi_destroy_gluebi(vol)) | ||
380 | dbg_err("cannot destroy gluebi for volume %d:%d", | ||
381 | ubi->ubi_num, vol_id); | ||
382 | out_cdev: | 374 | out_cdev: |
383 | cdev_del(&vol->cdev); | 375 | cdev_del(&vol->cdev); |
384 | out_mapping: | 376 | out_mapping: |
@@ -433,10 +425,6 @@ int ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl) | |||
433 | ubi->volumes[vol_id] = NULL; | 425 | ubi->volumes[vol_id] = NULL; |
434 | spin_unlock(&ubi->volumes_lock); | 426 | spin_unlock(&ubi->volumes_lock); |
435 | 427 | ||
436 | err = ubi_destroy_gluebi(vol); | ||
437 | if (err) | ||
438 | goto out_err; | ||
439 | |||
440 | if (!no_vtbl) { | 428 | if (!no_vtbl) { |
441 | err = ubi_change_vtbl_record(ubi, vol_id, NULL); | 429 | err = ubi_change_vtbl_record(ubi, vol_id, NULL); |
442 | if (err) | 430 | if (err) |
@@ -674,10 +662,6 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol) | |||
674 | return err; | 662 | return err; |
675 | } | 663 | } |
676 | 664 | ||
677 | err = ubi_create_gluebi(ubi, vol); | ||
678 | if (err) | ||
679 | goto out_cdev; | ||
680 | |||
681 | vol->dev.release = vol_release; | 665 | vol->dev.release = vol_release; |
682 | vol->dev.parent = &ubi->dev; | 666 | vol->dev.parent = &ubi->dev; |
683 | vol->dev.devt = dev; | 667 | vol->dev.devt = dev; |
@@ -685,12 +669,11 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol) | |||
685 | dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); | 669 | dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id); |
686 | err = device_register(&vol->dev); | 670 | err = device_register(&vol->dev); |
687 | if (err) | 671 | if (err) |
688 | goto out_gluebi; | 672 | goto out_cdev; |
689 | 673 | ||
690 | err = volume_sysfs_init(ubi, vol); | 674 | err = volume_sysfs_init(ubi, vol); |
691 | if (err) { | 675 | if (err) { |
692 | cdev_del(&vol->cdev); | 676 | cdev_del(&vol->cdev); |
693 | err = ubi_destroy_gluebi(vol); | ||
694 | volume_sysfs_close(vol); | 677 | volume_sysfs_close(vol); |
695 | return err; | 678 | return err; |
696 | } | 679 | } |
@@ -699,8 +682,6 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol) | |||
699 | dbg_err("check failed while adding volume %d", vol_id); | 682 | dbg_err("check failed while adding volume %d", vol_id); |
700 | return err; | 683 | return err; |
701 | 684 | ||
702 | out_gluebi: | ||
703 | err = ubi_destroy_gluebi(vol); | ||
704 | out_cdev: | 685 | out_cdev: |
705 | cdev_del(&vol->cdev); | 686 | cdev_del(&vol->cdev); |
706 | return err; | 687 | return err; |
@@ -716,12 +697,9 @@ out_cdev: | |||
716 | */ | 697 | */ |
717 | void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol) | 698 | void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol) |
718 | { | 699 | { |
719 | int err; | ||
720 | |||
721 | dbg_gen("free volume %d", vol->vol_id); | 700 | dbg_gen("free volume %d", vol->vol_id); |
722 | 701 | ||
723 | ubi->volumes[vol->vol_id] = NULL; | 702 | ubi->volumes[vol->vol_id] = NULL; |
724 | err = ubi_destroy_gluebi(vol); | ||
725 | cdev_del(&vol->cdev); | 703 | cdev_del(&vol->cdev); |
726 | volume_sysfs_close(vol); | 704 | volume_sysfs_close(vol); |
727 | } | 705 | } |