Skip to content

Commit ca7be9c

Browse files
Dr. David Alan Gilbertrichardweinberger
authored andcommitted
mtd: ubi: Remove unused ubi_flush
ubi_flush() was added in 2012 as part of commit 62f3845 ("UBI: modify ubi_wl_flush function to clear work queue for a lnum") but has remained unused. (It's friend ubi_wl_flush() is still used) Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 347e9f5 commit ca7be9c

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

drivers/mtd/ubi/kapi.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -791,33 +791,6 @@ int ubi_sync(int ubi_num)
791791
}
792792
EXPORT_SYMBOL_GPL(ubi_sync);
793793

794-
/**
795-
* ubi_flush - flush UBI work queue.
796-
* @ubi_num: UBI device to flush work queue
797-
* @vol_id: volume id to flush for
798-
* @lnum: logical eraseblock number to flush for
799-
*
800-
* This function executes all pending works for a particular volume id / logical
801-
* eraseblock number pair. If either value is set to %UBI_ALL, then it acts as
802-
* a wildcard for all of the corresponding volume numbers or logical
803-
* eraseblock numbers. It returns zero in case of success and a negative error
804-
* code in case of failure.
805-
*/
806-
int ubi_flush(int ubi_num, int vol_id, int lnum)
807-
{
808-
struct ubi_device *ubi;
809-
int err = 0;
810-
811-
ubi = ubi_get_device(ubi_num);
812-
if (!ubi)
813-
return -ENODEV;
814-
815-
err = ubi_wl_flush(ubi, vol_id, lnum);
816-
ubi_put_device(ubi);
817-
return err;
818-
}
819-
EXPORT_SYMBOL_GPL(ubi_flush);
820-
821794
BLOCKING_NOTIFIER_HEAD(ubi_notifiers);
822795

823796
/**

include/linux/mtd/ubi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum);
250250
int ubi_leb_map(struct ubi_volume_desc *desc, int lnum);
251251
int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
252252
int ubi_sync(int ubi_num);
253-
int ubi_flush(int ubi_num, int vol_id, int lnum);
254253

255254
/*
256255
* This function is the same as the 'ubi_leb_read()' function, but it does not

0 commit comments

Comments
 (0)