]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: remove unused function descriptor fields and change class->function_type
authorMatt Porter <mporter@linaro.org>
Sat, 27 Sep 2014 01:49:50 +0000 (20:49 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 30 Sep 2014 00:57:33 +0000 (17:57 -0700)
Greybus spec was updated to remove a number of unused function descriptor
fields. In addition, the class field was change to function_type to avoid
confusion with the concept of high-level class drivers.

Signed-off-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/greybus_manifest.h
drivers/staging/greybus/sysfs.c

index 6dda11cef5ef96c5f4762ede4eb9c58899038d4d..2830d552f0e17c5f58072a2a8a30b17ea4174a3a 100644 (file)
@@ -31,7 +31,7 @@ struct greybus_descriptor_header {
        __le16  type;   /* enum greybus_descriptor_type */
 };
 
-enum greybus_function_class {
+enum greybus_function_type {
        GREYBUS_FUNCTION_CONTROL        = 0x00,
        GREYBUS_FUNCTION_USB            = 0x01,
        GREYBUS_FUNCTION_GPIO           = 0x02,
@@ -49,12 +49,8 @@ enum greybus_function_class {
 };
 
 struct greybus_descriptor_function {
-       __le16  number;
        __le16  cport;
-       __u8    class;          /* enum greybus_function_class */
-       __u8    subclass;
-       __u8    protocol;
-       __u8    reserved;
+       __u8    function_type;  /* enum greybus_function_type */
 };
 
 struct greybus_descriptor_module {
index 55dc7b786ac8e6872b402cbd22d214bb076d0617..1f17388445ad87524b6ebb4b857705d41905ec81 100644 (file)
@@ -31,18 +31,12 @@ static ssize_t function_##field##_show(struct device *dev,          \
 }                                                                      \
 static DEVICE_ATTR_RO(function_##field)
 
-greybus_function_attr(number);
 greybus_function_attr(cport);
-greybus_function_attr(class);
-greybus_function_attr(subclass);
-greybus_function_attr(protocol);
+greybus_function_attr(function_type);
 
 static struct attribute *function_attrs[] = {
-       &dev_attr_function_number.attr,
        &dev_attr_function_cport.attr,
-       &dev_attr_function_class.attr,
-       &dev_attr_function_subclass.attr,
-       &dev_attr_function_protocol.attr,
+       &dev_attr_function_function_type.attr,
        NULL,
 };
 
@@ -53,11 +47,8 @@ static umode_t function_attrs_are_visible(struct kobject *kobj,
 
        // FIXME - make this a dynamic structure to "know" if it really is here
        // or not easier?
-       if (gmod->function.number ||
-           gmod->function.cport ||
-           gmod->function.class ||
-           gmod->function.subclass ||
-           gmod->function.protocol)
+       if (gmod->function.cport ||
+           gmod->function.function_type)
                return a->mode;
        return 0;
 }