Files
magenta/dev/char.c
T

20 lines
333 B
C
Raw Normal View History

2023-04-03 16:59:14 +01:00
#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;
2023-04-03 16:59:14 +01:00
return CHAR_DEVICE(dev);
}
2023-06-10 13:21:42 +01:00
struct char_device *char_device_from_generic(struct device *dev)
{
dev->dev_type = DEV_TYPE_CHAR;
return CHAR_DEVICE(dev);
}