lkml.org 
[lkml]   [2016]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 44/46] mtd: nandsim: Wire up NANDSIM_IOC_DESTROY_INSTANCE
Date
From: Richard Weinberger <richard@nod.at>

The logic for destroying nandsim instances now also ready.

Signed-off-by: Richard Weinberger <richard@nod.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
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.263 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site