diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-17 13:33:20 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-26 12:15:17 -0500 |
commit | cdfa788acd134a35d3e5b73d1a76fca4033d8aa9 (patch) | |
tree | ccc8cbf0bad80f569d9e3bbdc7cbf9c97556f155 /drivers/mtd/ubi/ubi.h | |
parent | e73f4459d969bb266f03dd4cbe21bdba8cb2732c (diff) |
UBI: prepare attach and detach functions
Prepare the attach and detach functions to by used outside of
module initialization:
* detach function checks reference count before detaching
* it kills the background thread as well
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 91fde0e8ff58..25ff15a7fc58 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -404,6 +404,7 @@ extern struct file_operations ubi_ctrl_cdev_operations; | |||
404 | extern struct file_operations ubi_cdev_operations; | 404 | extern struct file_operations ubi_cdev_operations; |
405 | extern struct file_operations ubi_vol_cdev_operations; | 405 | extern struct file_operations ubi_vol_cdev_operations; |
406 | extern struct class *ubi_class; | 406 | extern struct class *ubi_class; |
407 | extern struct mutex ubi_devices_mutex; | ||
407 | 408 | ||
408 | /* vtbl.c */ | 409 | /* vtbl.c */ |
409 | int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, | 410 | int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, |
@@ -462,6 +463,7 @@ int ubi_wl_flush(struct ubi_device *ubi); | |||
462 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); | 463 | int ubi_wl_scrub_peb(struct ubi_device *ubi, int pnum); |
463 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); | 464 | int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si); |
464 | void ubi_wl_close(struct ubi_device *ubi); | 465 | void ubi_wl_close(struct ubi_device *ubi); |
466 | int ubi_thread(void *u); | ||
465 | 467 | ||
466 | /* io.c */ | 468 | /* io.c */ |
467 | int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset, | 469 | int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset, |
@@ -481,6 +483,9 @@ int ubi_io_write_vid_hdr(struct ubi_device *ubi, int pnum, | |||
481 | struct ubi_vid_hdr *vid_hdr); | 483 | struct ubi_vid_hdr *vid_hdr); |
482 | 484 | ||
483 | /* build.c */ | 485 | /* build.c */ |
486 | int ubi_attach_mtd_dev(struct mtd_info *mtd, int vid_hdr_offset, | ||
487 | int data_offset); | ||
488 | int ubi_detach_mtd_dev(int ubi_num, int anyway); | ||
484 | struct ubi_device *ubi_get_device(int ubi_num); | 489 | struct ubi_device *ubi_get_device(int ubi_num); |
485 | void ubi_put_device(struct ubi_device *ubi); | 490 | void ubi_put_device(struct ubi_device *ubi); |
486 | struct ubi_device *ubi_get_by_major(int major); | 491 | struct ubi_device *ubi_get_by_major(int major); |