#include 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); }