greybus: firmware: prefix char-device with 'gb-'
This will make it consistent with any other character devices we have
for greybus and let us identify greybus character devices easily.
Compiled tested only.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware-management b/drivers/staging/greybus/Documentation/firmware/firmware-management
index bafe700..79977396 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware-management
+++ b/drivers/staging/greybus/Documentation/firmware/firmware-management
@@ -49,14 +49,14 @@
The Firmware Management Protocol interacts with Userspace using the character
device interface. The character device will be present in /dev/ directory
-and will be named fw-mgmt-<N>. The number <N> is assigned at runtime.
+and will be named gb-fw-mgmt-<N>. The number <N> is assigned at runtime.
Identifying the Character Device
================================
-There can be multiple devices present in /dev/ directory with name fw-mgmt-N and
-user first needs to identify the character device used for firmware-management
-for a particular interface.
+There can be multiple devices present in /dev/ directory with name gb-fw-mgmt-N
+and user first needs to identify the character device used for
+firmware-management for a particular interface.
The Firmware Management core creates a device of class 'gb_fw_mgmt', which shall
be used by the user to identify the right character device for it. The class
@@ -64,17 +64,17 @@
For example this is how the class-device can be present:
-/sys/bus/greybus/devices/1-1/1-1.1/1-1.1.1/gb_fw_mgmt/fw-mgmt-0
+/sys/bus/greybus/devices/1-1/1-1.1/1-1.1.1/gb_fw_mgmt/gb-fw-mgmt-0
-The last name in this path: fw-mgmt-0 is precisely the name of the char device
-and so the device in this case will be:
+The last name in this path: gb-fw-mgmt-0 is precisely the name of the char
+device and so the device in this case will be:
-/dev/fw-mgmt-0.
+/dev/gb-fw-mgmt-0.
Operations on the Char device
=============================
-The Character device (fw-mgmt-0 in example) can be opened by the userspace
+The Character device (gb-fw-mgmt-0 in example) can be opened by the userspace
application and it can perform various 'ioctl' operations on the device. The
device doesn't support any read/write operations.
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
index 4a3782e..3c305f7 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware.c
+++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
@@ -74,7 +74,7 @@
/* Make sure arguments are correct */
if (argc != 2) {
- printf("\nUsage: ./firmware <Path of the fw-mgmt-X dev>\n");
+ printf("\nUsage: ./firmware <Path of the gb-fw-mgmt-X dev>\n");
return 0;
}
diff --git a/drivers/staging/greybus/fw-management.c b/drivers/staging/greybus/fw-management.c
index c9c28fc..ccd9d7c 100644
--- a/drivers/staging/greybus/fw-management.c
+++ b/drivers/staging/greybus/fw-management.c
@@ -599,7 +599,7 @@
/* Add a soft link to the previously added char-dev within the bundle */
fw_mgmt->class_device = device_create(fw_mgmt_class, fw_mgmt->parent,
fw_mgmt->dev_num, NULL,
- "fw-mgmt-%d", minor);
+ "gb-fw-mgmt-%d", minor);
if (IS_ERR(fw_mgmt->class_device)) {
ret = PTR_ERR(fw_mgmt->class_device);
goto err_del_cdev;