title: Linux cdev vs register_chrdev
body: <p>I am reworking a driver and came across the cdev interface in LDD3. After reading <a href="http://lwn.net/Articles/195805/" rel="nofollow noreferrer">http://lwn.net/Articles/195805/</a> I am more confused than enlightened. From the comments there</p>
  
  <blockquote>
    <ul>
    <li>In order the device to actually appear in the file system, you have to call <code>device_create (class, parent_dev, devno, device_name)</code>.</li>
    <li>In order to call <code>device_create</code> you need to have a device class object: either use one of the existing classes, or create your own with <code>create_class (THIS_MODULE, class_name)</code></li>
    </ul>
    
    <p>I think this is for sysfs only.</p>
  </blockquote>
  
  <ol>
  <li><p>So, is the new interface an attempt to change something that failed,
  and is it thus recommended to continue using <code>device_create</code>?</p></li>
  <li><p>If <code>cdev</code> is recommended how do I create the sysfs entry?</p></li>
  <li><p>I never quite understood the benefit of having a device class, is
  there a point in having one and if so how do I implement it with
  cdev?</p></li>
  </ol>