diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-22 09:39:25 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-27 08:15:32 +0200 |
commit | 29c844b965ec3d28f0791c6f0ba64882e2ea0ffe (patch) | |
tree | e8edfa5d91c74da2dbdf78fff9dfa67ba50748ba /drivers/mtd | |
parent | 520226a0149b59de3fa1cb5013bf458ee66d16c8 (diff) | |
download | barebox-29c844b965ec3d28f0791c6f0ba64882e2ea0ffe.tar.gz barebox-29c844b965ec3d28f0791c6f0ba64882e2ea0ffe.tar.xz |
mtd: ubi: remove now unused ioctls
The only ioctl needed is the one to get the ubi_num from a file
descriptor. The remaining ioctls are now implemented as regular
function calls.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/barebox.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/mtd/ubi/barebox.c b/drivers/mtd/ubi/barebox.c index cb9223ebab..23c4bfd841 100644 --- a/drivers/mtd/ubi/barebox.c +++ b/drivers/mtd/ubi/barebox.c @@ -282,23 +282,14 @@ int ubi_api_remove_volume(struct ubi_volume_desc *desc, int no_vtbl) static int ubi_cdev_ioctl(struct cdev *cdev, int cmd, void *buf) { - struct ubi_volume_desc *desc; struct ubi_device *ubi = cdev->priv; - struct ubi_mkvol_req *req = buf; switch (cmd) { - case UBI_IOCRMVOL: - desc = ubi_open_volume_nm(ubi->ubi_num, req->name, - UBI_EXCLUSIVE); - if (IS_ERR(desc)) - return PTR_ERR(desc); - ubi_remove_volume(desc, 0); - ubi_close_volume(desc); - break; - case UBI_IOCMKVOL: - if (!req->bytes) - req->bytes = (__s64)ubi->avail_pebs * ubi->leb_size; - return ubi_create_volume(ubi, req); + /* + * Only supported ioctl is a barebox specific one to get the ubi_num + * from the file descriptor. The rest is implemented as function calls + * directly. + */ case UBI_IOCGETUBINUM: *(u32 *)buf = ubi->ubi_num; break; |