diff --git a/drivers/staging/greybus/ap.c b/drivers/staging/greybus/ap.c index a70404d7c1f1..aee47f50274d 100644 --- a/drivers/staging/greybus/ap.c +++ b/drivers/staging/greybus/ap.c @@ -17,7 +17,7 @@ #include #include #include "svc_msg.h" -#include "greybus_desc.h" +#include "greybus_manifest.h" #include "greybus.h" struct ap_msg { diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 76938cd00288..107e1fb75b8d 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -344,16 +344,16 @@ static int create_cport(struct greybus_device *gdev, } /** - * greybus_new_device: + * greybus_new_module: * - * Pass in a buffer that _should_ be a set of greybus descriptor fields and spit - * out a greybus device structure. + * Pass in a buffer that _should_ contain a Greybus module manifest + * and spit out a greybus device structure. */ -struct greybus_device *greybus_new_device(struct device *parent, +struct greybus_device *greybus_new_module(struct device *parent, int module_number, u8 *data, int size) { struct greybus_device *gdev; - struct greybus_descriptor_block_header *block; + struct greybus_manifest_header *header; struct greybus_descriptor *desc; int retval; int overall_size; @@ -361,8 +361,8 @@ struct greybus_device *greybus_new_device(struct device *parent, u8 version_major; u8 version_minor; - /* we have to have at _least_ the block header */ - if (size <= sizeof(struct greybus_descriptor_block_header)) + /* we have to have at _least_ the manifest header */ + if (size <= sizeof(struct greybus_manifest_header)) return NULL; gdev = kzalloc(sizeof(*gdev), GFP_KERNEL); @@ -379,21 +379,21 @@ struct greybus_device *greybus_new_device(struct device *parent, device_initialize(&gdev->dev); dev_set_name(&gdev->dev, "%d", module_number); - block = (struct greybus_descriptor_block_header *)data; - overall_size = le16_to_cpu(block->size); + header = (struct greybus_manifest_header *)data; + overall_size = le16_to_cpu(header->size); if (overall_size != size) { - dev_err(parent, "size != block header size, %d != %d\n", size, - overall_size); + dev_err(parent, "size != manifest header size, %d != %d\n", + size, overall_size); goto error; } - version_major = block->version_major; - version_minor = block->version_minor; + version_major = header->version_major; + version_minor = header->version_minor; // FIXME - check version major/minor here! - size -= sizeof(struct greybus_descriptor_block_header); - data += sizeof(struct greybus_descriptor_block_header); + size -= sizeof(struct greybus_manifest_header); + data += sizeof(struct greybus_manifest_header); while (size > 0) { desc = (struct greybus_descriptor *)data; desc_size = le16_to_cpu(desc->header.size); diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h index 2b96917c8730..a8d13b55de18 100644 --- a/drivers/staging/greybus/greybus.h +++ b/drivers/staging/greybus/greybus.h @@ -16,7 +16,7 @@ #include #include #include "greybus_id.h" -#include "greybus_desc.h" +#include "greybus_manifest.h" #define GREYBUS_DEVICE_ID_MATCH_DEVICE \ @@ -209,7 +209,7 @@ void greybus_deregister(struct greybus_driver *driver); int greybus_disabled(void); -struct greybus_device *greybus_new_device(struct device *parent, +struct greybus_device *greybus_new_module(struct device *parent, int module_number, u8 *data, int size); void greybus_remove_device(struct greybus_device *gdev); diff --git a/drivers/staging/greybus/greybus_desc.h b/drivers/staging/greybus/greybus_manifest.h similarity index 98% rename from drivers/staging/greybus/greybus_desc.h rename to drivers/staging/greybus/greybus_manifest.h index 592b6517d43b..293451eee4d9 100644 --- a/drivers/staging/greybus/greybus_desc.h +++ b/drivers/staging/greybus/greybus_manifest.h @@ -12,7 +12,7 @@ #pragma pack(push, 1) -struct greybus_descriptor_block_header { +struct greybus_manifest_header { __le16 size; __u8 version_major; __u8 version_minor;