aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-19 23:06:59 -0400
committerIan Moffett <ian@osmora.org>2024-05-19 23:06:59 -0400
commit2da0120af12cda00194522d04b50edf2f2166382 (patch)
tree83a6355b356ddb10d5a652be01e6590d097fe0ad /sys/dev/ic
parent673753e8befcfbb575380ed0d23fc6741b4e50a0 (diff)
kernel: dev: Define stub open hooks
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/nvme.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 142003c..729abe8 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -346,6 +346,12 @@ nvme_dev_write(struct device *dev, struct sio_txn *sio)
return nvme_dev_rw(dev, sio, true);
}
+static int
+nvme_dev_open(struct device *dev)
+{
+ return 0;
+}
+
/*
* Get identify data for namespace
*
@@ -409,6 +415,7 @@ nvme_init_ns(struct nvme_state *state, uint16_t nsid)
dev = device_alloc();
dev->read = nvme_dev_read;
dev->write = nvme_dev_write;
+ dev->open = nvme_dev_open;
dev->blocksize = ns->lba_bsize;
dev->mmap = NULL;
ns->dev_id = device_create(dev, state->major, nsid);