[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160831072853.27822-45-dwalter@sigma-star.at>
Date: Wed, 31 Aug 2016 09:28:51 +0200
From: Daniel Walter <dwalter@...ma-star.at>
To: linux-mtd@...ts.infradead.org
Cc: Richard Weinberger <richard@....at>, linux-kernel@...r.kernel.org
Subject: [PATCH 44/46] mtd: nandsim: Wire up NANDSIM_IOC_DESTROY_INSTANCE
From: Richard Weinberger <richard@....at>
The logic for destroying nandsim instances now also ready.
Signed-off-by: Richard Weinberger <richard@....at>
---
drivers/mtd/nand/nandsim.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 4145ab6..8a63812 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -2922,6 +2922,19 @@ static long ns_ctrl_ioctl(struct file *file, unsigned int cmd,
ret = ns_ctrl_new_instance(&req, argp + sizeof(req));
break;
}
+ case NANDSIM_IOC_DESTROY_INSTANCE:
+ {
+ struct ns_destroy_instance_req req;
+
+ ret = copy_from_user(&req, argp, sizeof(struct ns_destroy_instance_req));
+ if (ret) {
+ ret = -EFAULT;
+ goto out;
+ }
+
+ ret = ns_ctrl_destroy_instance(&req);
+ break;
+ }
default:
ret = -ENOTTY;
--
2.8.3
Powered by blists - more mailing lists