greybus: remove unused function descriptor fields and change class->function_type
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>
diff --git a/drivers/staging/greybus/sysfs.c b/drivers/staging/greybus/sysfs.c
index 55dc7b7..1f17388 100644
--- a/drivers/staging/greybus/sysfs.c
+++ b/drivers/staging/greybus/sysfs.c
@@ -31,18 +31,12 @@
} \
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 @@
// 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;
}