<!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;">&#160; class_hello = class_create(THIS_MODULE, device_name);</span><br><span style="font-family: courier new,courier,monospace;"> # class_hello-&#62;devnode = &#38;hello_devnode;</span><br><span style="font-family: courier new,courier,monospace;">&#160; retval = alloc_chrdev_region( &#38;dev_file, 0, 1, device_name );</span><br><span style="font-family: courier new,courier,monospace;">&#160; cdev_init( &#38;device, &#38;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(&#38;device.kobj, device_name);</span><br><span style="font-family: courier new,courier,monospace;">&#160; cdev_add( &#38;device, MKDEV(dev_file, 0), 1 ) </span><br><span style="font-family: courier new,courier,monospace;">&#160; 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-&#62;devt = MKDEV(dev_file, 0);</span><br></p><p><br></p><p>Make it open / close / read / write works fine&#160; - 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 &#34;dev&#34; 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>