• Patrick Mochel's avatar
    driverfs: Add struct attribute · 9bb83ce6
    Patrick Mochel authored
    driverfs can only handle passing struct device to read/write functions. In order to free it of this limitation,
    we need a common data structure for driverfs to pass around. 
    
    The only thing that driverfs really needs are the name and mode of the file, which are now located in struct
    attribute.
    
    struct device_attribute gets a struct attribute member, which holds the name and mode. With the DEVICE_ATTR 
    macro, users of the structure require no modification.
    
    device_create_file is modified to take a struct attribute parameter
    
    a to_dev_attr() macro is introduced to convert between a struct attribute to a struct device_attribute
    9bb83ce6
fs.c 3.88 KB