lkml.org 
[lkml]   [2004]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: patch for sysfs in the cyclades driver
        Marcelo> The problem was class_simple only contains the "dev"
    Marcelo> attribute. You can't add other attributes to it.

    I believe, based on the comment in class_simple.c:

    Any further sysfs files that might be required can be created using this pointer.

    and the implementation in in drivers/scsi/st.c, that there's no
    problem adding attributes to a device in a simple class. You can just
    use class_set_devdata() on your class_device to set whatever context
    you need to get back to your internal structures, and then use
    class_device_create_file() to add the attributes.

    I assume this is OK (since there is already one in-kernel driver doing
    it), but Greg, can you confirm that it's definitely OK for a driver to
    use class_set_devdata() on a class_device from class_simple_device_add()?

    Thanks,
    Roland
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:4.557 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site