Loading drivers/staging/greybus/bundle.c +10 −10 Original line number Diff line number Diff line Loading @@ -22,18 +22,18 @@ static ssize_t device_id_show(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR_RO(device_id); static ssize_t class_type_show(struct device *dev, struct device_attribute *attr, static ssize_t class_show(struct device *dev, struct device_attribute *attr, char *buf) { struct gb_bundle *bundle = to_gb_bundle(dev); return sprintf(buf, "%d\n", bundle->class_type); return sprintf(buf, "%d\n", bundle->class); } static DEVICE_ATTR_RO(class_type); static DEVICE_ATTR_RO(class); static struct attribute *bundle_attrs[] = { &dev_attr_device_id.attr, &dev_attr_class_type.attr, &dev_attr_class.attr, NULL, }; Loading Loading @@ -66,8 +66,8 @@ static int gb_bundle_match_one_id(struct gb_bundle *bundle, (id->unique_id != bundle->intf->unique_id)) return 0; if ((id->match_flags & GREYBUS_ID_MATCH_CLASS_TYPE) && (id->class_type != bundle->class_type)) if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) && (id->class != bundle->class)) return 0; return 1; Loading @@ -80,7 +80,7 @@ gb_bundle_match_id(struct gb_bundle *bundle, if (id == NULL) return NULL; for (; id->vendor || id->product || id->unique_id || id->class_type || for (; id->vendor || id->product || id->unique_id || id->class || id->driver_info; id++) { if (gb_bundle_match_one_id(bundle, id)) return id; Loading Loading @@ -129,7 +129,7 @@ void gb_bundle_bind_protocols(void) * pointer if a failure occurs due to memory exhaustion. */ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, u8 class_type) u8 class) { struct gb_bundle *bundle; int retval; Loading @@ -140,7 +140,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, bundle->intf = intf; bundle->id = bundle_id; bundle->class_type = class_type; bundle->class = class; INIT_LIST_HEAD(&bundle->connections); /* Invalid device id to start with */ Loading drivers/staging/greybus/bundle.h +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ struct gb_bundle { struct device dev; struct gb_interface *intf; u8 id; u8 class_type; u8 class; u8 device_id; struct list_head connections; Loading @@ -29,7 +29,7 @@ struct gb_bundle { /* Greybus "private" definitions" */ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, u8 class_type); u8 class); void gb_bundle_destroy(struct gb_interface *intf); int gb_bundle_init(struct gb_bundle *bundle, u8 device_id); int gb_bundles_init(struct gb_interface *intf, u8 device_id); Loading drivers/staging/greybus/greybus_id.h +2 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ struct greybus_bundle_id { __u16 match_flags; __u16 vendor; __u16 product; __u8 class_type; __u8 class; __u64 unique_id; kernel_ulong_t driver_info __aligned(sizeof(kernel_ulong_t)); Loading @@ -23,6 +23,6 @@ struct greybus_bundle_id { #define GREYBUS_ID_MATCH_VENDOR BIT(0) #define GREYBUS_ID_MATCH_PRODUCT BIT(1) #define GREYBUS_ID_MATCH_SERIAL BIT(2) #define GREYBUS_ID_MATCH_CLASS_TYPE BIT(3) #define GREYBUS_ID_MATCH_CLASS BIT(3) #endif /* __LINUX_GREYBUS_ID_H */ drivers/staging/greybus/greybus_manifest.h +3 −3 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ struct greybus_descriptor_interface { }; /* * An bundle descriptor defines an identification number and a class type for * An bundle descriptor defines an identification number and a class for * each bundle. * * @id: Uniquely identifies a bundle within a interface, its sole purpose is to Loading @@ -105,7 +105,7 @@ struct greybus_descriptor_interface { * encode the device id and module number in UniPro packets * that use the bundle. * * @class_type: It is used by kernel to know the functionality provided by the * @class: It is used by kernel to know the functionality provided by the * bundle and will be matched against drivers functinality while probing greybus * driver. It should contain one of the values defined in * 'enum greybus_class_type'. Loading @@ -113,7 +113,7 @@ struct greybus_descriptor_interface { */ struct greybus_descriptor_bundle { __u8 id; /* interface-relative id (0..) */ __u8 class_type; __u8 class; }; /* Loading drivers/staging/greybus/manifest.c +1 −1 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf) /* Found one. Set up its bundle structure*/ desc_bundle = descriptor->data; bundle = gb_bundle_create(intf, desc_bundle->id, desc_bundle->class_type); desc_bundle->class); if (!bundle) return 0; /* Error */ Loading Loading
drivers/staging/greybus/bundle.c +10 −10 Original line number Diff line number Diff line Loading @@ -22,18 +22,18 @@ static ssize_t device_id_show(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR_RO(device_id); static ssize_t class_type_show(struct device *dev, struct device_attribute *attr, static ssize_t class_show(struct device *dev, struct device_attribute *attr, char *buf) { struct gb_bundle *bundle = to_gb_bundle(dev); return sprintf(buf, "%d\n", bundle->class_type); return sprintf(buf, "%d\n", bundle->class); } static DEVICE_ATTR_RO(class_type); static DEVICE_ATTR_RO(class); static struct attribute *bundle_attrs[] = { &dev_attr_device_id.attr, &dev_attr_class_type.attr, &dev_attr_class.attr, NULL, }; Loading Loading @@ -66,8 +66,8 @@ static int gb_bundle_match_one_id(struct gb_bundle *bundle, (id->unique_id != bundle->intf->unique_id)) return 0; if ((id->match_flags & GREYBUS_ID_MATCH_CLASS_TYPE) && (id->class_type != bundle->class_type)) if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) && (id->class != bundle->class)) return 0; return 1; Loading @@ -80,7 +80,7 @@ gb_bundle_match_id(struct gb_bundle *bundle, if (id == NULL) return NULL; for (; id->vendor || id->product || id->unique_id || id->class_type || for (; id->vendor || id->product || id->unique_id || id->class || id->driver_info; id++) { if (gb_bundle_match_one_id(bundle, id)) return id; Loading Loading @@ -129,7 +129,7 @@ void gb_bundle_bind_protocols(void) * pointer if a failure occurs due to memory exhaustion. */ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, u8 class_type) u8 class) { struct gb_bundle *bundle; int retval; Loading @@ -140,7 +140,7 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, bundle->intf = intf; bundle->id = bundle_id; bundle->class_type = class_type; bundle->class = class; INIT_LIST_HEAD(&bundle->connections); /* Invalid device id to start with */ Loading
drivers/staging/greybus/bundle.h +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ struct gb_bundle { struct device dev; struct gb_interface *intf; u8 id; u8 class_type; u8 class; u8 device_id; struct list_head connections; Loading @@ -29,7 +29,7 @@ struct gb_bundle { /* Greybus "private" definitions" */ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, u8 class_type); u8 class); void gb_bundle_destroy(struct gb_interface *intf); int gb_bundle_init(struct gb_bundle *bundle, u8 device_id); int gb_bundles_init(struct gb_interface *intf, u8 device_id); Loading
drivers/staging/greybus/greybus_id.h +2 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ struct greybus_bundle_id { __u16 match_flags; __u16 vendor; __u16 product; __u8 class_type; __u8 class; __u64 unique_id; kernel_ulong_t driver_info __aligned(sizeof(kernel_ulong_t)); Loading @@ -23,6 +23,6 @@ struct greybus_bundle_id { #define GREYBUS_ID_MATCH_VENDOR BIT(0) #define GREYBUS_ID_MATCH_PRODUCT BIT(1) #define GREYBUS_ID_MATCH_SERIAL BIT(2) #define GREYBUS_ID_MATCH_CLASS_TYPE BIT(3) #define GREYBUS_ID_MATCH_CLASS BIT(3) #endif /* __LINUX_GREYBUS_ID_H */
drivers/staging/greybus/greybus_manifest.h +3 −3 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ struct greybus_descriptor_interface { }; /* * An bundle descriptor defines an identification number and a class type for * An bundle descriptor defines an identification number and a class for * each bundle. * * @id: Uniquely identifies a bundle within a interface, its sole purpose is to Loading @@ -105,7 +105,7 @@ struct greybus_descriptor_interface { * encode the device id and module number in UniPro packets * that use the bundle. * * @class_type: It is used by kernel to know the functionality provided by the * @class: It is used by kernel to know the functionality provided by the * bundle and will be matched against drivers functinality while probing greybus * driver. It should contain one of the values defined in * 'enum greybus_class_type'. Loading @@ -113,7 +113,7 @@ struct greybus_descriptor_interface { */ struct greybus_descriptor_bundle { __u8 id; /* interface-relative id (0..) */ __u8 class_type; __u8 class; }; /* Loading
drivers/staging/greybus/manifest.c +1 −1 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf) /* Found one. Set up its bundle structure*/ desc_bundle = descriptor->data; bundle = gb_bundle_create(intf, desc_bundle->id, desc_bundle->class_type); desc_bundle->class); if (!bundle) return 0; /* Error */ Loading