From 4ee48a5ecb7a3af272ac2c6cd6a0865b95a3d5f2 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 15 Jun 2016 15:58:22 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- .../Documentation/firmware/firmware-management | 18 +++++++++--------- .../greybus/Documentation/firmware/firmware.c | 2 +- drivers/staging/greybus/fw-management.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/greybus/Documentation/firmware/firmware-management b/drivers/staging/greybus/Documentation/firmware/firmware-management index bafe700f9901..79977396ef00 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware-management +++ b/drivers/staging/greybus/Documentation/firmware/firmware-management @@ -49,14 +49,14 @@ Sysfs Interfaces - Firmware Management 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-. The number is assigned at runtime. +and will be named gb-fw-mgmt-. The number 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 @@ device is created within the Bundle directory for a particular Interface. 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 4a3782e07d71..3c305f774939 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware.c +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) /* Make sure arguments are correct */ if (argc != 2) { - printf("\nUsage: ./firmware \n"); + printf("\nUsage: ./firmware \n"); return 0; } diff --git a/drivers/staging/greybus/fw-management.c b/drivers/staging/greybus/fw-management.c index c9c28fc15492..ccd9d7c91416 100644 --- a/drivers/staging/greybus/fw-management.c +++ b/drivers/staging/greybus/fw-management.c @@ -599,7 +599,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection) /* 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; -- 2.20.1