1. 03 Jun, 2004 4 commits
    • Patrick Mochel's avatar
      [Driver Model] Add default attributes for struct bus_type. · ee831b82
      Patrick Mochel authored
      - Similar to default attributes for struct class, this is an array
        of attributes, terminated with an attribute with a NULL name, that
        are added when the bus is registered, and removed when the bus is 
        unregistered. 
      ee831b82
    • Patrick Mochel's avatar
      [Driver Model] Add default attributes for classes class devices. · 0d1c76a0
      Patrick Mochel authored
      - add struct class::class_attrs, which is designed to point to an 
        array of class_attributes that are added when the class is registered
        and removed when the class is unregistered. 
        This allows for more consolidated and cleaner definition of and
        management of attributes.
      
      - Add struct class::class_dev_attrs to do something similarly for 
        class devices. Each class device that is registered with the class
        gets that set of attributes added for them, and subsequently removed
        when the device is unregistered.
      
      Each array depends on a terminating attribute with a NULL name. Hint:
      use the new __ATTR_NULL macro to terminate it.
      0d1c76a0
    • Patrick Mochel's avatar
      [sysfs] Add attr_name() macro · e33617a4
      Patrick Mochel authored
      - Returns the name of an embedded attribute in a higher-level 
        attribute.
      e33617a4
    • Patrick Mochel's avatar
      [Driver Model] Fix up silly scsi usage of DEVICE_ATTR() macros. · a4e2bce3
      Patrick Mochel authored
      - Hey, just because the macro incorrectly included a ';' doesn't mean
        one shouldn't add one on their own.. (Or at least be consistent.)
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      a4e2bce3
  2. 02 Jun, 2004 1 commit
    • Patrick Mochel's avatar
      [Driver Model] Consolidate attribute definition macros · fb86ec51
      Patrick Mochel authored
      - Create __ATTR(), __ATTR_RO(), and __ATTR_NULL macros to help define 
        attributes in a neat, short-hand form. 
      
      - Apply these macros to the attribute definition in include/linux/device.h
      
      - Note: These can be used to more cleanly define attributes in your own
        code. e.g: 
      
      	static struct device_attribute attrs[] = {
      		__ATTR_RO(foo),
      		__ATTR_RO(bar),
      		__ATTR(baz,0666,baz_show,baz_store),
      		__ATTR_NULL,
      	};
      
        ...etc. 
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      fb86ec51
  3. 31 May, 2004 12 commits
  4. 01 Jun, 2004 6 commits
  5. 31 May, 2004 17 commits