dev: add functions to create device objects
This commit is contained in:
12
dev/char.c
Normal file
12
dev/char.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <socks/device.h>
|
||||
|
||||
struct char_device *char_device_create(void)
|
||||
{
|
||||
struct device *dev = device_alloc();
|
||||
if (!dev) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dev->dev_type = DEV_TYPE_CHAR;
|
||||
return CHAR_DEVICE(dev);
|
||||
}
|
||||
Reference in New Issue
Block a user