Create device for Ethos-U kernel driver
When the Ethos-U kernel driver is probed it creates a /dev/ethosu<nr>
device node, which user space use ioctl to communicate with. When
the driver is removed the Ethos-U resources must live on until all
open file handles have been closed.
The rpmsg device can be removed for a number of reasons, for example
if the firmware is stopped or the remoteproc driver is removed. To
allow the remove to complete without waiting for all file handles to
close, a new 'struct device' is created by the kernel driver. This
device will be used to memory allocations and will live on until the
last file handle has been closed.
Change-Id: I790d8219960f25fe64f58c11a865eb65c7b08974
diff --git a/kernel/ethosu_device.h b/kernel/ethosu_device.h
index d02f29d..d866514 100644
--- a/kernel/ethosu_device.h
+++ b/kernel/ethosu_device.h
@@ -42,11 +42,11 @@
* struct ethosu_device - Device structure
*/
struct ethosu_device {
+ struct device dev;
struct rpmsg_device *rpdev;
struct rpmsg_endpoint *ept;
struct cdev cdev;
struct class *class;
- dev_t devt;
struct ethosu_mailbox mailbox;
};