OSDN Git Service

greybus: Prefix module-id with endo id
authorViresh Kumar <viresh.kumar@linaro.org>
Sun, 7 Jun 2015 03:43:16 +0000 (09:13 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 8 Jun 2015 22:18:02 +0000 (15:18 -0700)
Prefix module-id with endo-id to uniquely identify it for the entire
kernel.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/module.c

index 07b7e44..d770654 100644 (file)
@@ -144,7 +144,7 @@ struct gb_module *gb_module_create(struct device *parent, u8 module_id)
        module->dev.groups = module_groups;
        module->dev.dma_mask = parent->dma_mask;
        device_initialize(&module->dev);
-       dev_set_name(&module->dev, "%d", module_id);
+       dev_set_name(&module->dev, "%s:%hhu", dev_name(parent), module_id);
 
        retval = device_add(&module->dev);
        if (retval) {