master/slave.c
changeset 184 2fc86cec12df
parent 183 8ae1e011e96c
child 185 af570302dcee
equal deleted inserted replaced
183:8ae1e011e96c 184:2fc86cec12df
    26 int ec_slave_locate_string(ec_slave_t *, unsigned int, char **);
    26 int ec_slave_locate_string(ec_slave_t *, unsigned int, char **);
    27 ssize_t ec_show_slave_attribute(struct kobject *, struct attribute *, char *);
    27 ssize_t ec_show_slave_attribute(struct kobject *, struct attribute *, char *);
    28 
    28 
    29 /*****************************************************************************/
    29 /*****************************************************************************/
    30 
    30 
    31 static struct attribute attr_ring_position = {
    31 EC_SYSFS_READ_ATTR(ring_position);
    32     .name = "ring_position", .owner = THIS_MODULE, .mode = S_IRUGO
    32 EC_SYSFS_READ_ATTR(station_address);
    33 };
    33 EC_SYSFS_READ_ATTR(vendor_name);
    34 
    34 EC_SYSFS_READ_ATTR(product_name);
    35 static struct attribute attr_station_address = {
    35 EC_SYSFS_READ_ATTR(product_desc);
    36     .name = "station_address", .owner = THIS_MODULE, .mode = S_IRUGO
       
    37 };
       
    38 
       
    39 static struct attribute attr_vendor_name = {
       
    40     .name = "vendor_name", .owner = THIS_MODULE, .mode = S_IRUGO
       
    41 };
       
    42 
       
    43 static struct attribute attr_product_name = {
       
    44     .name = "product_name", .owner = THIS_MODULE, .mode = S_IRUGO
       
    45 };
       
    46 
       
    47 static struct attribute attr_product_desc = {
       
    48     .name = "product_description", .owner = THIS_MODULE, .mode = S_IRUGO
       
    49 };
       
    50 
    36 
    51 static struct attribute *def_attrs[] = {
    37 static struct attribute *def_attrs[] = {
    52     &attr_ring_position,
    38     &attr_ring_position,
    53     &attr_station_address,
    39     &attr_station_address,
    54     &attr_vendor_name,
    40     &attr_vendor_name,