<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
</head><body><p>I have written the following lines of code <br></p><p>to get a char device working.<br></p><p>( lines with # indicate that I have tried versions of this code snippet without them)<br></p><p><span style="font-family: courier new,courier,monospace;">  class_hello = class_create(THIS_MODULE, device_name);</span><br><span style="font-family: courier new,courier,monospace;"> # class_hello->devnode = &hello_devnode;</span><br><span style="font-family: courier new,courier,monospace;">  retval = alloc_chrdev_region( &dev_file, 0, 1, device_name );</span><br><span style="font-family: courier new,courier,monospace;">  cdev_init( &device, &file_ops );</span><br><span style="font-family: courier new,courier,monospace;"> # device.owner = THIS_MODULE;</span></p><p><span style="font-family: courier new,courier,monospace;"># kobject_set_name(&device.kobj, device_name);</span><br><span style="font-family: courier new,courier,monospace;">  cdev_add( &device, MKDEV(dev_file, 0), 1 ) </span><br><span style="font-family: courier new,courier,monospace;">  device = device_create( class_hello, NULL, MKDEV(dev_file, 0), NULL, device_name );</span><br><span style="font-family: courier new,courier,monospace;"> # kobj_device->devt = MKDEV(dev_file, 0);</span><br></p><p><br></p><p>Make it open / close / read / write works fine  - but look at that<br></p><p><span style="font-family: courier new,courier,monospace;">$ ls /sys/class/hello/hello</span><br><span style="font-family: courier new,courier,monospace;">power subsystem uevent</span><br></p><p>The "dev" entry is missing - and udev does not react.<br></p><p>Anybody knows what is else needed to make udev react?<br></p></body></html>