Commit b32c5cb8 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

staging: unisys: Switch to use new generic UUID API

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

While here, re-indent couple of lines to increase readability.

Cc: David Kershner <david.kershner@unisys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: sparmaintainer@unisys.com
Cc: devel@driverdev.osuosl.org
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab61097c
...@@ -221,7 +221,7 @@ The following files exist under /sys/devices/visorbus<x>/vbus<x>:dev<y>: ...@@ -221,7 +221,7 @@ The following files exist under /sys/devices/visorbus<x>/vbus<x>:dev<y>:
The visorhba driver registers with visorbus as the function driver to The visorhba driver registers with visorbus as the function driver to
handle virtual scsi disk devices, specified using the handle virtual scsi disk devices, specified using the
VISOR_VHBA_CHANNEL_UUID type in the visorbus_register_visor_driver() VISOR_VHBA_CHANNEL_GUID type in the visorbus_register_visor_driver()
call. visorhba uses scsi_add_host() to expose a Linux block device call. visorhba uses scsi_add_host() to expose a Linux block device
(e.g., /sys/block/) in the guest environment for each s-Par virtual device. (e.g., /sys/block/) in the guest environment for each s-Par virtual device.
...@@ -240,7 +240,7 @@ When compiled as a module, visorhba can be autoloaded by visorbus in ...@@ -240,7 +240,7 @@ When compiled as a module, visorhba can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias standard udev/systemd environments, as it includes the modules.alias
definition: definition:
"visorbus:"+VISOR_VHBA_CHANNEL_UUID_STR "visorbus:"+VISOR_VHBA_CHANNEL_GUID_STR
i.e.: i.e.:
...@@ -252,7 +252,7 @@ i.e.: ...@@ -252,7 +252,7 @@ i.e.:
The visornic driver registers with visorbus as the function driver to The visornic driver registers with visorbus as the function driver to
handle virtual network devices, specified using the handle virtual network devices, specified using the
VISOR_VNIC_CHANNEL_UUID type in the visorbus_register_visor_driver() VISOR_VNIC_CHANNEL_GUID type in the visorbus_register_visor_driver()
call. visornic uses register_netdev() to expose a Linux device of class net call. visornic uses register_netdev() to expose a Linux device of class net
(e.g., /sys/class/net/) in the guest environment for each s-Par virtual (e.g., /sys/class/net/) in the guest environment for each s-Par virtual
device. device.
...@@ -270,7 +270,7 @@ When compiled as a module, visornic can be autoloaded by visorbus in ...@@ -270,7 +270,7 @@ When compiled as a module, visornic can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias standard udev/systemd environments, as it includes the modules.alias
definition: definition:
"visorbus:"+VISOR_VNIC_CHANNEL_UUID_STR "visorbus:"+VISOR_VNIC_CHANNEL_GUID_STR
i.e.: i.e.:
...@@ -282,7 +282,7 @@ i.e.: ...@@ -282,7 +282,7 @@ i.e.:
The visorinput driver registers with visorbus as the function driver to The visorinput driver registers with visorbus as the function driver to
handle human input devices, specified using the handle human input devices, specified using the
VISOR_KEYBOARD_CHANNEL_UUID and VISOR_MOUSE_CHANNEL_UUID VISOR_KEYBOARD_CHANNEL_GUID and VISOR_MOUSE_CHANNEL_GUID
types in the visorbus_register_visor_driver() call. visorinput uses types in the visorbus_register_visor_driver() call. visorinput uses
input_register_device() to expose devices of class input input_register_device() to expose devices of class input
(e.g., /sys/class/input/) for virtual keyboard and virtual mouse devices. (e.g., /sys/class/input/) for virtual keyboard and virtual mouse devices.
...@@ -307,8 +307,8 @@ When compiled as a module, visorinput can be autoloaded by visorbus in ...@@ -307,8 +307,8 @@ When compiled as a module, visorinput can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias standard udev/systemd environments, as it includes the modules.alias
definition: definition:
"visorbus:"+VISOR_MOUSE_CHANNEL_UUID_STR "visorbus:"+VISOR_MOUSE_CHANNEL_GUID_STR
"visorbus:"+VISOR_KEYBOARD_CHANNEL_UUID_STR "visorbus:"+VISOR_KEYBOARD_CHANNEL_GUID_STR
i.e.: i.e.:
......
...@@ -128,13 +128,13 @@ struct channel_header { ...@@ -128,13 +128,13 @@ struct channel_header {
u32 header_size; u32 header_size;
u64 size; u64 size;
u64 features; u64 features;
uuid_le chtype; guid_t chtype;
u64 partition_handle; u64 partition_handle;
u64 handle; u64 handle;
u64 ch_space_offset; u64 ch_space_offset;
u32 version_id; u32 version_id;
u32 partition_index; u32 partition_index;
uuid_le zone_uuid; guid_t zone_guid;
u32 cli_str_offset; u32 cli_str_offset;
u32 cli_state_boot; u32 cli_state_boot;
u32 cmd_state_cli; u32 cmd_state_cli;
...@@ -204,23 +204,20 @@ struct signal_queue_header { ...@@ -204,23 +204,20 @@ struct signal_queue_header {
/* CHANNEL Guids */ /* CHANNEL Guids */
/* {414815ed-c58c-11da-95a9-00e08161165f} */ /* {414815ed-c58c-11da-95a9-00e08161165f} */
#define VISOR_VHBA_CHANNEL_UUID \ #define VISOR_VHBA_CHANNEL_GUID \
UUID_LE(0x414815ed, 0xc58c, 0x11da, \ GUID_INIT(0x414815ed, 0xc58c, 0x11da, \
0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le visor_vhba_channel_uuid = VISOR_VHBA_CHANNEL_UUID; #define VISOR_VHBA_CHANNEL_GUID_STR \
#define VISOR_VHBA_CHANNEL_UUID_STR \
"414815ed-c58c-11da-95a9-00e08161165f" "414815ed-c58c-11da-95a9-00e08161165f"
/* {8cd5994d-c58e-11da-95a9-00e08161165f} */ /* {8cd5994d-c58e-11da-95a9-00e08161165f} */
#define VISOR_VNIC_CHANNEL_UUID \ #define VISOR_VNIC_CHANNEL_GUID \
UUID_LE(0x8cd5994d, 0xc58e, 0x11da, \ GUID_INIT(0x8cd5994d, 0xc58e, 0x11da, \
0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le visor_vnic_channel_uuid = VISOR_VNIC_CHANNEL_UUID; #define VISOR_VNIC_CHANNEL_GUID_STR \
#define VISOR_VNIC_CHANNEL_UUID_STR \
"8cd5994d-c58e-11da-95a9-00e08161165f" "8cd5994d-c58e-11da-95a9-00e08161165f"
/* {72120008-4AAB-11DC-8530-444553544200} */ /* {72120008-4AAB-11DC-8530-444553544200} */
#define VISOR_SIOVM_UUID \ #define VISOR_SIOVM_GUID \
UUID_LE(0x72120008, 0x4AAB, 0x11DC, \ GUID_INIT(0x72120008, 0x4AAB, 0x11DC, \
0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00) 0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00)
static const uuid_le visor_siovm_uuid = VISOR_SIOVM_UUID;
#endif #endif
...@@ -562,7 +562,7 @@ struct iochannel_vnic { ...@@ -562,7 +562,7 @@ struct iochannel_vnic {
/* 4 bytes */ /* 4 bytes */
u32 mtu; u32 mtu;
/* 16 bytes */ /* 16 bytes */
uuid_le zone_uuid; guid_t zone_guid;
} __packed; } __packed;
/* /*
......
...@@ -58,7 +58,7 @@ struct visorchipset_state { ...@@ -58,7 +58,7 @@ struct visorchipset_state {
* GUID, name, and sizes. * GUID, name, and sizes.
*/ */
struct visor_channeltype_descriptor { struct visor_channeltype_descriptor {
const uuid_le guid; const guid_t guid;
const char *name; const char *name;
}; };
...@@ -141,14 +141,14 @@ struct visor_driver { ...@@ -141,14 +141,14 @@ struct visor_driver {
* hypervisor requests. * hypervisor requests.
* @vbus_hdr_info: A pointer to header info. Private use by bus * @vbus_hdr_info: A pointer to header info. Private use by bus
* driver. * driver.
* @partition_uuid: Indicates client partion id. This should be the * @partition_guid: Indicates client partion id. This should be the
* same across all visor_devices in the current * same across all visor_devices in the current
* guest. Private use by bus driver only. * guest. Private use by bus driver only.
*/ */
struct visor_device { struct visor_device {
struct visorchannel *visorchannel; struct visorchannel *visorchannel;
uuid_le channel_type_guid; guid_t channel_type_guid;
/* These fields are for private use by the bus driver only. */ /* These fields are for private use by the bus driver only. */
struct device device; struct device device;
struct list_head list_all; struct list_head list_all;
...@@ -161,18 +161,18 @@ struct visor_device { ...@@ -161,18 +161,18 @@ struct visor_device {
u32 chipset_bus_no; u32 chipset_bus_no;
u32 chipset_dev_no; u32 chipset_dev_no;
struct visorchipset_state state; struct visorchipset_state state;
uuid_le inst; guid_t inst;
u8 *name; u8 *name;
struct controlvm_message_header *pending_msg_hdr; struct controlvm_message_header *pending_msg_hdr;
void *vbus_hdr_info; void *vbus_hdr_info;
uuid_le partition_uuid; guid_t partition_guid;
struct dentry *debugfs_dir; struct dentry *debugfs_dir;
struct dentry *debugfs_client_bus_info; struct dentry *debugfs_client_bus_info;
}; };
#define to_visor_device(x) container_of(x, struct visor_device, device) #define to_visor_device(x) container_of(x, struct visor_device, device)
int visor_check_channel(struct channel_header *ch, uuid_le expected_uuid, int visor_check_channel(struct channel_header *ch, const guid_t *expected_guid,
char *chname, u64 expected_min_bytes, char *chname, u64 expected_min_bytes,
u32 expected_version, u64 expected_signature); u32 expected_version, u64 expected_signature);
...@@ -211,7 +211,7 @@ int visorchannel_signalremove(struct visorchannel *channel, u32 queue, ...@@ -211,7 +211,7 @@ int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
void *msg); void *msg);
bool visorchannel_signalempty(struct visorchannel *channel, u32 queue); bool visorchannel_signalempty(struct visorchannel *channel, u32 queue);
uuid_le visorchannel_get_uuid(struct visorchannel *channel); const guid_t *visorchannel_get_guid(struct visorchannel *channel);
#define BUS_ROOT_DEVICE UINT_MAX #define BUS_ROOT_DEVICE UINT_MAX
struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include "channel.h" #include "channel.h"
/* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */ /* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
#define VISOR_CONTROLVM_CHANNEL_UUID \ #define VISOR_CONTROLVM_CHANNEL_GUID \
UUID_LE(0x2b3c2d10, 0x7ef5, 0x4ad8, \ GUID_INIT(0x2b3c2d10, 0x7ef5, 0x4ad8, \
0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d) 0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d)
#define CONTROLVM_MESSAGE_MAX 64 #define CONTROLVM_MESSAGE_MAX 64
...@@ -261,8 +261,8 @@ struct controlvm_packet_device_create { ...@@ -261,8 +261,8 @@ struct controlvm_packet_device_create {
u32 dev_no; u32 dev_no;
u64 channel_addr; u64 channel_addr;
u64 channel_bytes; u64 channel_bytes;
uuid_le data_type_uuid; guid_t data_type_guid;
uuid_le dev_inst_uuid; guid_t dev_inst_guid;
struct irq_info intr; struct irq_info intr;
} __packed; } __packed;
...@@ -372,8 +372,8 @@ struct controlvm_message_packet { ...@@ -372,8 +372,8 @@ struct controlvm_message_packet {
u32 dev_count; u32 dev_count;
u64 channel_addr; u64 channel_addr;
u64 channel_bytes; u64 channel_bytes;
uuid_le bus_data_type_uuid; guid_t bus_data_type_guid;
uuid_le bus_inst_uuid; guid_t bus_inst_guid;
} __packed create_bus; } __packed create_bus;
struct { struct {
u32 bus_no; u32 bus_no;
...@@ -591,7 +591,7 @@ struct visor_controlvm_parameters_header { ...@@ -591,7 +591,7 @@ struct visor_controlvm_parameters_header {
u32 client_length; u32 client_length;
u32 name_offset; u32 name_offset;
u32 name_length; u32 name_length;
uuid_le id; guid_t id;
u32 revision; u32 revision;
/* Natural alignment */ /* Natural alignment */
u32 reserved; u32 reserved;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "channel.h" #include "channel.h"
/* {193b331b-c58f-11da-95a9-00e08161165f} */ /* {193b331b-c58f-11da-95a9-00e08161165f} */
#define VISOR_VBUS_CHANNEL_UUID \ #define VISOR_VBUS_CHANNEL_GUID \
UUID_LE(0x193b331b, 0xc58f, 0x11da, \ GUID_INIT(0x193b331b, 0xc58f, 0x11da, \
0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
/* /*
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
*/ */
#define VISOR_VBUS_CHANNEL_VERSIONID 1 #define VISOR_VBUS_CHANNEL_VERSIONID 1
static const uuid_le visor_vbus_channel_uuid = VISOR_VBUS_CHANNEL_UUID;
/* struct visor_vbus_deviceinfo /* struct visor_vbus_deviceinfo
* @devtype: Short string identifying the device type. * @devtype: Short string identifying the device type.
* @drvname: Driver .sys file name. * @drvname: Driver .sys file name.
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "visorbus.h" #include "visorbus.h"
#include "visorbus_private.h" #include "visorbus_private.h"
static const guid_t visor_vbus_channel_guid = VISOR_VBUS_CHANNEL_GUID;
/* Display string that is guaranteed to be no longer the 99 characters */ /* Display string that is guaranteed to be no longer the 99 characters */
#define LINESIZE 99 #define LINESIZE 99
#define POLLJIFFIES_NORMALCHANNEL 10 #define POLLJIFFIES_NORMALCHANNEL 10
...@@ -38,11 +40,11 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, ...@@ -38,11 +40,11 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct visor_device *vdev; struct visor_device *vdev;
uuid_le guid; const guid_t *guid;
vdev = to_visor_device(dev); vdev = to_visor_device(dev);
guid = visorchannel_get_uuid(vdev->visorchannel); guid = visorchannel_get_guid(vdev->visorchannel);
return sprintf(buf, "visorbus:%pUl\n", &guid); return sprintf(buf, "visorbus:%pUl\n", guid);
} }
static DEVICE_ATTR_RO(modalias); static DEVICE_ATTR_RO(modalias);
...@@ -78,18 +80,18 @@ static LIST_HEAD(list_all_device_instances); ...@@ -78,18 +80,18 @@ static LIST_HEAD(list_all_device_instances);
* is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages. * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
*/ */
int visor_check_channel(struct channel_header *ch, int visor_check_channel(struct channel_header *ch,
uuid_le expected_uuid, const guid_t *expected_guid,
char *chname, char *chname,
u64 expected_min_bytes, u64 expected_min_bytes,
u32 expected_version, u32 expected_version,
u64 expected_signature) u64 expected_signature)
{ {
if (uuid_le_cmp(expected_uuid, NULL_UUID_LE) != 0) { if (!guid_is_null(expected_guid)) {
/* caller wants us to verify type GUID */ /* caller wants us to verify type GUID */
if (uuid_le_cmp(ch->chtype, expected_uuid) != 0) { if (!guid_equal(&ch->chtype, expected_guid)) {
pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n", pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
chname, &expected_uuid, chname, expected_guid,
&expected_uuid, &ch->chtype); expected_guid, &ch->chtype);
return 0; return 0;
} }
} }
...@@ -97,7 +99,7 @@ int visor_check_channel(struct channel_header *ch, ...@@ -97,7 +99,7 @@ int visor_check_channel(struct channel_header *ch,
if (expected_min_bytes > 0) { if (expected_min_bytes > 0) {
if (ch->size < expected_min_bytes) { if (ch->size < expected_min_bytes) {
pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n", pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
chname, &expected_uuid, chname, expected_guid,
(unsigned long long)expected_min_bytes, (unsigned long long)expected_min_bytes,
ch->size); ch->size);
return 0; return 0;
...@@ -107,7 +109,7 @@ int visor_check_channel(struct channel_header *ch, ...@@ -107,7 +109,7 @@ int visor_check_channel(struct channel_header *ch,
if (expected_version > 0) { if (expected_version > 0) {
if (ch->version_id != expected_version) { if (ch->version_id != expected_version) {
pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n", pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8x\n",
chname, &expected_uuid, chname, expected_guid,
(unsigned long)expected_version, (unsigned long)expected_version,
ch->version_id); ch->version_id);
return 0; return 0;
...@@ -117,7 +119,7 @@ int visor_check_channel(struct channel_header *ch, ...@@ -117,7 +119,7 @@ int visor_check_channel(struct channel_header *ch,
if (expected_signature > 0) { if (expected_signature > 0) {
if (ch->signature != expected_signature) { if (ch->signature != expected_signature) {
pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n", pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
chname, &expected_uuid, chname, expected_guid,
expected_signature, ch->signature); expected_signature, ch->signature);
return 0; return 0;
} }
...@@ -129,12 +131,12 @@ EXPORT_SYMBOL_GPL(visor_check_channel); ...@@ -129,12 +131,12 @@ EXPORT_SYMBOL_GPL(visor_check_channel);
static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env) static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
{ {
struct visor_device *dev; struct visor_device *dev;
uuid_le guid; const guid_t *guid;
dev = to_visor_device(xdev); dev = to_visor_device(xdev);
guid = visorchannel_get_uuid(dev->visorchannel); guid = visorchannel_get_guid(dev->visorchannel);
return add_uevent_var(env, "MODALIAS=visorbus:%pUl", &guid); return add_uevent_var(env, "MODALIAS=visorbus:%pUl", guid);
} }
/* /*
...@@ -148,23 +150,21 @@ static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env) ...@@ -148,23 +150,21 @@ static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
*/ */
static int visorbus_match(struct device *xdev, struct device_driver *xdrv) static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
{ {
uuid_le channel_type; const guid_t *channel_type;
int i; int i;
struct visor_device *dev; struct visor_device *dev;
struct visor_driver *drv; struct visor_driver *drv;
dev = to_visor_device(xdev); dev = to_visor_device(xdev);
channel_type = visorchannel_get_uuid(dev->visorchannel); channel_type = visorchannel_get_guid(dev->visorchannel);
drv = to_visor_driver(xdrv); drv = to_visor_driver(xdrv);
if (!drv->channel_types) if (!drv->channel_types)
return 0; return 0;
for (i = 0; for (i = 0;
(uuid_le_cmp(drv->channel_types[i].guid, NULL_UUID_LE) != 0) || !guid_is_null(&drv->channel_types[i].guid) || drv->channel_types[i].name;
(drv->channel_types[i].name);
i++) i++)
if (uuid_le_cmp(drv->channel_types[i].guid, if (guid_equal(&drv->channel_types[i].guid, channel_type))
channel_type) == 0)
return i + 1; return i + 1;
return 0; return 0;
...@@ -330,7 +330,7 @@ static ssize_t partition_guid_show(struct device *dev, ...@@ -330,7 +330,7 @@ static ssize_t partition_guid_show(struct device *dev,
{ {
struct visor_device *vdev = to_visor_device(dev); struct visor_device *vdev = to_visor_device(dev);
return sprintf(buf, "{%pUb}\n", &vdev->partition_uuid); return sprintf(buf, "{%pUb}\n", &vdev->partition_guid);
} }
static DEVICE_ATTR_RO(partition_guid); static DEVICE_ATTR_RO(partition_guid);
...@@ -729,7 +729,7 @@ static int get_vbus_header_info(struct visorchannel *chan, ...@@ -729,7 +729,7 @@ static int get_vbus_header_info(struct visorchannel *chan,
int err; int err;
if (!visor_check_channel(visorchannel_get_header(chan), if (!visor_check_channel(visorchannel_get_header(chan),
visor_vbus_channel_uuid, &visor_vbus_channel_guid,
"vbus", "vbus",
sizeof(struct visor_vbus_channel), sizeof(struct visor_vbus_channel),
VISOR_VBUS_CHANNEL_VERSIONID, VISOR_VBUS_CHANNEL_VERSIONID,
......
...@@ -44,10 +44,10 @@ void visorbus_exit(void); ...@@ -44,10 +44,10 @@ void visorbus_exit(void);
struct visorchannel *visorchannel_create(u64 physaddr, struct visorchannel *visorchannel_create(u64 physaddr,
unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid); gfp_t gfp, const guid_t *guid);
struct visorchannel *visorchannel_create_with_lock(u64 physaddr, struct visorchannel *visorchannel_create_with_lock(u64 physaddr,
unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid); gfp_t gfp, const guid_t *guid);
void visorchannel_destroy(struct visorchannel *channel); void visorchannel_destroy(struct visorchannel *channel);
int visorchannel_read(struct visorchannel *channel, ulong offset, int visorchannel_read(struct visorchannel *channel, ulong offset,
void *dest, ulong nbytes); void *dest, ulong nbytes);
...@@ -60,6 +60,6 @@ char *visorchannel_zoneid(struct visorchannel *channel, char *s); ...@@ -60,6 +60,6 @@ char *visorchannel_zoneid(struct visorchannel *channel, char *s);
u64 visorchannel_get_clientpartition(struct visorchannel *channel); u64 visorchannel_get_clientpartition(struct visorchannel *channel);
int visorchannel_set_clientpartition(struct visorchannel *channel, int visorchannel_set_clientpartition(struct visorchannel *channel,
u64 partition_handle); u64 partition_handle);
char *visorchannel_uuid_id(uuid_le *guid, char *s); char *visorchannel_guid_id(const guid_t *guid, char *s);
void *visorchannel_get_header(struct visorchannel *channel); void *visorchannel_get_header(struct visorchannel *channel);
#endif #endif
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
#define VISOR_DRV_NAME "visorchannel" #define VISOR_DRV_NAME "visorchannel"
#define VISOR_CONSOLEVIDEO_CHANNEL_GUID \ #define VISOR_CONSOLEVIDEO_CHANNEL_GUID \
UUID_LE(0x3cd6e705, 0xd6a2, 0x4aa5, \ GUID_INIT(0x3cd6e705, 0xd6a2, 0x4aa5, \
0xad, 0x5c, 0x7b, 0x8, 0x88, 0x9d, 0xff, 0xe2) 0xad, 0x5c, 0x7b, 0x8, 0x88, 0x9d, 0xff, 0xe2)
static const uuid_le visor_video_guid = VISOR_CONSOLEVIDEO_CHANNEL_GUID; static const guid_t visor_video_guid = VISOR_CONSOLEVIDEO_CHANNEL_GUID;
struct visorchannel { struct visorchannel {
u64 physaddr; u64 physaddr;
...@@ -40,7 +40,7 @@ struct visorchannel { ...@@ -40,7 +40,7 @@ struct visorchannel {
void *mapped; void *mapped;
bool requested; bool requested;
struct channel_header chan_hdr; struct channel_header chan_hdr;
uuid_le guid; guid_t guid;
/* /*
* channel creator knows if more than one * channel creator knows if more than one
* thread will be inserting or removing * thread will be inserting or removing
...@@ -50,8 +50,8 @@ struct visorchannel { ...@@ -50,8 +50,8 @@ struct visorchannel {
spinlock_t insert_lock; spinlock_t insert_lock;
/* protect tail writes in chan_hdr */ /* protect tail writes in chan_hdr */
spinlock_t remove_lock; spinlock_t remove_lock;
uuid_le type; guid_t type;
uuid_le inst; guid_t inst;
}; };
void visorchannel_destroy(struct visorchannel *channel) void visorchannel_destroy(struct visorchannel *channel)
...@@ -76,7 +76,7 @@ ulong visorchannel_get_nbytes(struct visorchannel *channel) ...@@ -76,7 +76,7 @@ ulong visorchannel_get_nbytes(struct visorchannel *channel)
return channel->nbytes; return channel->nbytes;
} }
char *visorchannel_uuid_id(uuid_le *guid, char *s) char *visorchannel_guid_id(const guid_t *guid, char *s)
{ {
sprintf(s, "%pUL", guid); sprintf(s, "%pUL", guid);
return s; return s;
...@@ -84,12 +84,12 @@ char *visorchannel_uuid_id(uuid_le *guid, char *s) ...@@ -84,12 +84,12 @@ char *visorchannel_uuid_id(uuid_le *guid, char *s)
char *visorchannel_id(struct visorchannel *channel, char *s) char *visorchannel_id(struct visorchannel *channel, char *s)
{ {
return visorchannel_uuid_id(&channel->guid, s); return visorchannel_guid_id(&channel->guid, s);
} }
char *visorchannel_zoneid(struct visorchannel *channel, char *s) char *visorchannel_zoneid(struct visorchannel *channel, char *s)
{ {
return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s); return visorchannel_guid_id(&channel->chan_hdr.zone_guid, s);
} }
u64 visorchannel_get_clientpartition(struct visorchannel *channel) u64 visorchannel_get_clientpartition(struct visorchannel *channel)
...@@ -105,16 +105,16 @@ int visorchannel_set_clientpartition(struct visorchannel *channel, ...@@ -105,16 +105,16 @@ int visorchannel_set_clientpartition(struct visorchannel *channel,
} }
/** /**
* visorchannel_get_uuid() - queries the UUID of the designated channel * visorchannel_get_guid() - queries the GUID of the designated channel
* @channel: the channel to query * @channel: the channel to query
* *
* Return: the UUID of the provided channel * Return: the GUID of the provided channel
*/ */
uuid_le visorchannel_get_uuid(struct visorchannel *channel) const guid_t *visorchannel_get_guid(struct visorchannel *channel)
{ {
return channel->guid; return &channel->guid;
} }
EXPORT_SYMBOL_GPL(visorchannel_get_uuid); EXPORT_SYMBOL_GPL(visorchannel_get_guid);
int visorchannel_read(struct visorchannel *channel, ulong offset, void *dest, int visorchannel_read(struct visorchannel *channel, ulong offset, void *dest,
ulong nbytes) ulong nbytes)
...@@ -365,7 +365,7 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue, ...@@ -365,7 +365,7 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
* back-end), in which case the actual channel size will be * back-end), in which case the actual channel size will be
* read from the channel header in memory * read from the channel header in memory
* @gfp: gfp_t to use when allocating memory for the data struct * @gfp: gfp_t to use when allocating memory for the data struct
* @guid: uuid that identifies channel type; this may 0 if the channel * @guid: GUID that identifies channel type; this may 0 if the channel
* has already been initialized in memory (which is true for all * has already been initialized in memory (which is true for all
* channels provided to guest environments by the s-Par * channels provided to guest environments by the s-Par
* back-end), in which case the actual channel guid will be * back-end), in which case the actual channel guid will be
...@@ -380,7 +380,7 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue, ...@@ -380,7 +380,7 @@ static int signalinsert_inner(struct visorchannel *channel, u32 queue,
static struct visorchannel *visorchannel_create_guts( static struct visorchannel *visorchannel_create_guts(
u64 physaddr, u64 physaddr,
unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid, gfp_t gfp, const guid_t *guid,
bool needs_lock) bool needs_lock)
{ {
struct visorchannel *channel; struct visorchannel *channel;
...@@ -406,7 +406,7 @@ static struct visorchannel *visorchannel_create_guts( ...@@ -406,7 +406,7 @@ static struct visorchannel *visorchannel_create_guts(
* release later on. * release later on.
*/ */
channel->requested = request_mem_region(physaddr, size, VISOR_DRV_NAME); channel->requested = request_mem_region(physaddr, size, VISOR_DRV_NAME);
if (!channel->requested && uuid_le_cmp(guid, visor_video_guid)) if (!channel->requested && !guid_equal(guid, &visor_video_guid))
/* we only care about errors if this is not the video channel */ /* we only care about errors if this is not the video channel */
goto err_destroy_channel; goto err_destroy_channel;
...@@ -427,8 +427,8 @@ static struct visorchannel *visorchannel_create_guts( ...@@ -427,8 +427,8 @@ static struct visorchannel *visorchannel_create_guts(
/* we had better be a CLIENT of this channel */ /* we had better be a CLIENT of this channel */
if (channel_bytes == 0) if (channel_bytes == 0)
channel_bytes = (ulong)channel->chan_hdr.size; channel_bytes = (ulong)channel->chan_hdr.size;
if (uuid_le_cmp(guid, NULL_UUID_LE) == 0) if (guid_is_null(guid))
guid = channel->chan_hdr.chtype; guid = &channel->chan_hdr.chtype;
memunmap(channel->mapped); memunmap(channel->mapped);
if (channel->requested) if (channel->requested)
...@@ -436,7 +436,7 @@ static struct visorchannel *visorchannel_create_guts( ...@@ -436,7 +436,7 @@ static struct visorchannel *visorchannel_create_guts(
channel->mapped = NULL; channel->mapped = NULL;
channel->requested = request_mem_region(channel->physaddr, channel->requested = request_mem_region(channel->physaddr,
channel_bytes, VISOR_DRV_NAME); channel_bytes, VISOR_DRV_NAME);
if (!channel->requested && uuid_le_cmp(guid, visor_video_guid)) if (!channel->requested && !guid_equal(guid, &visor_video_guid))
/* we only care about errors if this is not the video channel */ /* we only care about errors if this is not the video channel */
goto err_destroy_channel; goto err_destroy_channel;
...@@ -448,7 +448,7 @@ static struct visorchannel *visorchannel_create_guts( ...@@ -448,7 +448,7 @@ static struct visorchannel *visorchannel_create_guts(
} }
channel->nbytes = channel_bytes; channel->nbytes = channel_bytes;
channel->guid = guid; guid_copy(&channel->guid, guid);
return channel; return channel;
err_destroy_channel: err_destroy_channel:
...@@ -458,7 +458,7 @@ static struct visorchannel *visorchannel_create_guts( ...@@ -458,7 +458,7 @@ static struct visorchannel *visorchannel_create_guts(
struct visorchannel *visorchannel_create(u64 physaddr, struct visorchannel *visorchannel_create(u64 physaddr,
unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid) gfp_t gfp, const guid_t *guid)
{ {
return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid, return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
false); false);
...@@ -466,7 +466,7 @@ struct visorchannel *visorchannel_create(u64 physaddr, ...@@ -466,7 +466,7 @@ struct visorchannel *visorchannel_create(u64 physaddr,
struct visorchannel *visorchannel_create_with_lock(u64 physaddr, struct visorchannel *visorchannel_create_with_lock(u64 physaddr,
unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid) gfp_t gfp, const guid_t *guid)
{ {
return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid, return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
true); true);
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#include "visorbus_private.h" #include "visorbus_private.h"
#include "vmcallinterface.h" #include "vmcallinterface.h"
static const guid_t visor_vhba_channel_guid = VISOR_VHBA_CHANNEL_GUID;
static const guid_t visor_siovm_guid = VISOR_SIOVM_GUID;
static const guid_t visor_controlvm_channel_guid = VISOR_CONTROLVM_CHANNEL_GUID;
#define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1 #define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1
#define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100 #define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
...@@ -267,13 +271,12 @@ static ssize_t remaining_steps_store(struct device *dev, ...@@ -267,13 +271,12 @@ static ssize_t remaining_steps_store(struct device *dev,
} }
static DEVICE_ATTR_RW(remaining_steps); static DEVICE_ATTR_RW(remaining_steps);
static uuid_le static const guid_t *parser_id_get(struct parser_context *ctx)
parser_id_get(struct parser_context *ctx)
{ {
struct visor_controlvm_parameters_header *phdr = NULL; struct visor_controlvm_parameters_header *phdr = NULL;
phdr = (struct visor_controlvm_parameters_header *)(ctx->data); phdr = (struct visor_controlvm_parameters_header *)(ctx->data);
return phdr->id; return &phdr->id;
} }
static void parser_done(struct parser_context *ctx) static void parser_done(struct parser_context *ctx)
...@@ -588,7 +591,7 @@ visorbus_create(struct controlvm_message *inmsg) ...@@ -588,7 +591,7 @@ visorbus_create(struct controlvm_message *inmsg)
bus_info->chipset_bus_no = bus_no; bus_info->chipset_bus_no = bus_no;
bus_info->chipset_dev_no = BUS_ROOT_DEVICE; bus_info->chipset_dev_no = BUS_ROOT_DEVICE;
if (uuid_le_cmp(cmd->create_bus.bus_inst_uuid, visor_siovm_uuid) == 0) { if (guid_equal(&cmd->create_bus.bus_inst_guid, &visor_siovm_guid)) {
err = save_crash_message(inmsg, CRASH_BUS); err = save_crash_message(inmsg, CRASH_BUS);
if (err) if (err)
goto err_free_bus_info; goto err_free_bus_info;
...@@ -610,7 +613,7 @@ visorbus_create(struct controlvm_message *inmsg) ...@@ -610,7 +613,7 @@ visorbus_create(struct controlvm_message *inmsg)
visorchannel = visorchannel_create(cmd->create_bus.channel_addr, visorchannel = visorchannel_create(cmd->create_bus.channel_addr,
cmd->create_bus.channel_bytes, cmd->create_bus.channel_bytes,
GFP_KERNEL, GFP_KERNEL,
cmd->create_bus.bus_data_type_uuid); &cmd->create_bus.bus_data_type_guid);
if (!visorchannel) { if (!visorchannel) {
err = -ENOMEM; err = -ENOMEM;
goto err_free_pending_msg; goto err_free_pending_msg;
...@@ -715,7 +718,9 @@ visorbus_configure(struct controlvm_message *inmsg, ...@@ -715,7 +718,9 @@ visorbus_configure(struct controlvm_message *inmsg,
goto err_respond; goto err_respond;
if (parser_ctx) { if (parser_ctx) {
bus_info->partition_uuid = parser_id_get(parser_ctx); const guid_t *partition_guid = parser_id_get(parser_ctx);
guid_copy(&bus_info->partition_guid, partition_guid);
bus_info->name = parser_name_get(parser_ctx); bus_info->name = parser_name_get(parser_ctx);
} }
...@@ -773,7 +778,7 @@ visorbus_device_create(struct controlvm_message *inmsg) ...@@ -773,7 +778,7 @@ visorbus_device_create(struct controlvm_message *inmsg)
dev_info->chipset_bus_no = bus_no; dev_info->chipset_bus_no = bus_no;
dev_info->chipset_dev_no = dev_no; dev_info->chipset_dev_no = dev_no;
dev_info->inst = cmd->create_device.dev_inst_uuid; guid_copy(&dev_info->inst, &cmd->create_device.dev_inst_guid);
/* not sure where the best place to set the 'parent' */ /* not sure where the best place to set the 'parent' */
dev_info->device.parent = &bus_info->device; dev_info->device.parent = &bus_info->device;
...@@ -782,7 +787,7 @@ visorbus_device_create(struct controlvm_message *inmsg) ...@@ -782,7 +787,7 @@ visorbus_device_create(struct controlvm_message *inmsg)
visorchannel_create_with_lock(cmd->create_device.channel_addr, visorchannel_create_with_lock(cmd->create_device.channel_addr,
cmd->create_device.channel_bytes, cmd->create_device.channel_bytes,
GFP_KERNEL, GFP_KERNEL,
cmd->create_device.data_type_uuid); &cmd->create_device.data_type_guid);
if (!visorchannel) { if (!visorchannel) {
dev_err(&chipset_dev->acpi_device->dev, dev_err(&chipset_dev->acpi_device->dev,
"failed to create visorchannel: %d/%d\n", "failed to create visorchannel: %d/%d\n",
...@@ -791,9 +796,8 @@ visorbus_device_create(struct controlvm_message *inmsg) ...@@ -791,9 +796,8 @@ visorbus_device_create(struct controlvm_message *inmsg)
goto err_free_dev_info; goto err_free_dev_info;
} }
dev_info->visorchannel = visorchannel; dev_info->visorchannel = visorchannel;
dev_info->channel_type_guid = cmd->create_device.data_type_uuid; guid_copy(&dev_info->channel_type_guid, &cmd->create_device.data_type_guid);
if (uuid_le_cmp(cmd->create_device.data_type_uuid, if (guid_equal(&cmd->create_device.data_type_guid, &visor_vhba_channel_guid)) {
visor_vhba_channel_uuid) == 0) {
err = save_crash_message(inmsg, CRASH_DEV); err = save_crash_message(inmsg, CRASH_DEV);
if (err) if (err)
goto err_destroy_visorchannel; goto err_destroy_visorchannel;
...@@ -1787,7 +1791,6 @@ visorchipset_init(struct acpi_device *acpi_device) ...@@ -1787,7 +1791,6 @@ visorchipset_init(struct acpi_device *acpi_device)
{ {
int err = -ENODEV; int err = -ENODEV;
u64 addr; u64 addr;
uuid_le uuid = VISOR_CONTROLVM_CHANNEL_UUID;
struct visorchannel *controlvm_channel; struct visorchannel *controlvm_channel;
chipset_dev = kzalloc(sizeof(*chipset_dev), GFP_KERNEL); chipset_dev = kzalloc(sizeof(*chipset_dev), GFP_KERNEL);
...@@ -1801,8 +1804,8 @@ visorchipset_init(struct acpi_device *acpi_device) ...@@ -1801,8 +1804,8 @@ visorchipset_init(struct acpi_device *acpi_device)
acpi_device->driver_data = chipset_dev; acpi_device->driver_data = chipset_dev;
chipset_dev->acpi_device = acpi_device; chipset_dev->acpi_device = acpi_device;
chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; chipset_dev->poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
controlvm_channel = visorchannel_create_with_lock(addr, controlvm_channel = visorchannel_create_with_lock(addr, 0, GFP_KERNEL,
0, GFP_KERNEL, uuid); &visor_controlvm_channel_guid);
if (!controlvm_channel) if (!controlvm_channel)
goto error_free_chipset_dev; goto error_free_chipset_dev;
...@@ -1814,7 +1817,7 @@ visorchipset_init(struct acpi_device *acpi_device) ...@@ -1814,7 +1817,7 @@ visorchipset_init(struct acpi_device *acpi_device)
goto error_destroy_channel; goto error_destroy_channel;
if (!visor_check_channel(visorchannel_get_header(controlvm_channel), if (!visor_check_channel(visorchannel_get_header(controlvm_channel),
VISOR_CONTROLVM_CHANNEL_UUID, &visor_controlvm_channel_guid,
"controlvm", "controlvm",
sizeof(struct visor_controlvm_channel), sizeof(struct visor_controlvm_channel),
VISOR_CONTROLVM_CHANNEL_VERSIONID, VISOR_CONTROLVM_CHANNEL_VERSIONID,
......
...@@ -39,12 +39,12 @@ static struct visor_channeltype_descriptor visorhba_channel_types[] = { ...@@ -39,12 +39,12 @@ static struct visor_channeltype_descriptor visorhba_channel_types[] = {
/* Note that the only channel type we expect to be reported by the /* Note that the only channel type we expect to be reported by the
* bus driver is the VISOR_VHBA channel. * bus driver is the VISOR_VHBA channel.
*/ */
{ VISOR_VHBA_CHANNEL_UUID, "sparvhba" }, { VISOR_VHBA_CHANNEL_GUID, "sparvhba" },
{ NULL_UUID_LE, NULL } {}
}; };
MODULE_DEVICE_TABLE(visorbus, visorhba_channel_types); MODULE_DEVICE_TABLE(visorbus, visorhba_channel_types);
MODULE_ALIAS("visorbus:" VISOR_VHBA_CHANNEL_UUID_STR); MODULE_ALIAS("visorbus:" VISOR_VHBA_CHANNEL_GUID_STR);
struct visordisk_info { struct visordisk_info {
u32 valid; u32 valid;
......
...@@ -33,16 +33,16 @@ ...@@ -33,16 +33,16 @@
#include "ultrainputreport.h" #include "ultrainputreport.h"
/* Keyboard channel {c73416d0-b0b8-44af-b304-9d2ae99f1b3d} */ /* Keyboard channel {c73416d0-b0b8-44af-b304-9d2ae99f1b3d} */
#define VISOR_KEYBOARD_CHANNEL_UUID \ #define VISOR_KEYBOARD_CHANNEL_GUID \
UUID_LE(0xc73416d0, 0xb0b8, 0x44af, \ GUID_INIT(0xc73416d0, 0xb0b8, 0x44af, \
0xb3, 0x4, 0x9d, 0x2a, 0xe9, 0x9f, 0x1b, 0x3d) 0xb3, 0x4, 0x9d, 0x2a, 0xe9, 0x9f, 0x1b, 0x3d)
#define VISOR_KEYBOARD_CHANNEL_UUID_STR "c73416d0-b0b8-44af-b304-9d2ae99f1b3d" #define VISOR_KEYBOARD_CHANNEL_GUID_STR "c73416d0-b0b8-44af-b304-9d2ae99f1b3d"
/* Mouse channel {addf07d4-94a9-46e2-81c3-61abcdbdbd87} */ /* Mouse channel {addf07d4-94a9-46e2-81c3-61abcdbdbd87} */
#define VISOR_MOUSE_CHANNEL_UUID \ #define VISOR_MOUSE_CHANNEL_GUID \
UUID_LE(0xaddf07d4, 0x94a9, 0x46e2, \ GUID_INIT(0xaddf07d4, 0x94a9, 0x46e2, \
0x81, 0xc3, 0x61, 0xab, 0xcd, 0xbd, 0xbd, 0x87) 0x81, 0xc3, 0x61, 0xab, 0xcd, 0xbd, 0xbd, 0x87)
#define VISOR_MOUSE_CHANNEL_UUID_STR "addf07d4-94a9-46e2-81c3-61abcdbdbd87" #define VISOR_MOUSE_CHANNEL_GUID_STR "addf07d4-94a9-46e2-81c3-61abcdbdbd87"
#define PIXELS_ACROSS_DEFAULT 800 #define PIXELS_ACROSS_DEFAULT 800
#define PIXELS_DOWN_DEFAULT 600 #define PIXELS_DOWN_DEFAULT 600
...@@ -71,8 +71,8 @@ struct visorinput_devdata { ...@@ -71,8 +71,8 @@ struct visorinput_devdata {
unsigned char keycode_table[0]; unsigned char keycode_table[0];
}; };
static const uuid_le visor_keyboard_channel_uuid = VISOR_KEYBOARD_CHANNEL_UUID; static const guid_t visor_keyboard_channel_guid = VISOR_KEYBOARD_CHANNEL_GUID;
static const uuid_le visor_mouse_channel_uuid = VISOR_MOUSE_CHANNEL_UUID; static const guid_t visor_mouse_channel_guid = VISOR_MOUSE_CHANNEL_GUID;
/* /*
* Borrowed from drivers/input/keyboard/atakbd.c * Borrowed from drivers/input/keyboard/atakbd.c
...@@ -448,13 +448,13 @@ static struct visorinput_devdata *devdata_create( ...@@ -448,13 +448,13 @@ static struct visorinput_devdata *devdata_create(
static int visorinput_probe(struct visor_device *dev) static int visorinput_probe(struct visor_device *dev)
{ {
uuid_le guid; const guid_t *guid;
enum visorinput_device_type devtype; enum visorinput_device_type devtype;
guid = visorchannel_get_uuid(dev->visorchannel); guid = visorchannel_get_guid(dev->visorchannel);
if (uuid_le_cmp(guid, visor_mouse_channel_uuid) == 0) if (guid_equal(guid, &visor_mouse_channel_guid))
devtype = visorinput_mouse; devtype = visorinput_mouse;
else if (uuid_le_cmp(guid, visor_keyboard_channel_uuid) == 0) else if (guid_equal(guid, &visor_keyboard_channel_guid))
devtype = visorinput_keyboard; devtype = visorinput_keyboard;
else else
return -ENODEV; return -ENODEV;
...@@ -715,9 +715,9 @@ static int visorinput_resume(struct visor_device *dev, ...@@ -715,9 +715,9 @@ static int visorinput_resume(struct visor_device *dev,
/* GUIDS for all channel types supported by this driver. */ /* GUIDS for all channel types supported by this driver. */
static struct visor_channeltype_descriptor visorinput_channel_types[] = { static struct visor_channeltype_descriptor visorinput_channel_types[] = {
{ VISOR_KEYBOARD_CHANNEL_UUID, "keyboard"}, { VISOR_KEYBOARD_CHANNEL_GUID, "keyboard"},
{ VISOR_MOUSE_CHANNEL_UUID, "mouse"}, { VISOR_MOUSE_CHANNEL_GUID, "mouse"},
{ NULL_UUID_LE, NULL } {}
}; };
static struct visor_driver visorinput_driver = { static struct visor_driver visorinput_driver = {
...@@ -750,5 +750,5 @@ MODULE_AUTHOR("Unisys"); ...@@ -750,5 +750,5 @@ MODULE_AUTHOR("Unisys");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("s-Par human input driver for virtual keyboard/mouse"); MODULE_DESCRIPTION("s-Par human input driver for virtual keyboard/mouse");
MODULE_ALIAS("visorbus:" VISOR_MOUSE_CHANNEL_UUID_STR); MODULE_ALIAS("visorbus:" VISOR_MOUSE_CHANNEL_GUID_STR);
MODULE_ALIAS("visorbus:" VISOR_KEYBOARD_CHANNEL_UUID_STR); MODULE_ALIAS("visorbus:" VISOR_KEYBOARD_CHANNEL_GUID_STR);
...@@ -41,8 +41,8 @@ static struct visor_channeltype_descriptor visornic_channel_types[] = { ...@@ -41,8 +41,8 @@ static struct visor_channeltype_descriptor visornic_channel_types[] = {
/* Note that the only channel type we expect to be reported by the /* Note that the only channel type we expect to be reported by the
* bus driver is the VISOR_VNIC channel. * bus driver is the VISOR_VNIC channel.
*/ */
{ VISOR_VNIC_CHANNEL_UUID, "ultravnic" }, { VISOR_VNIC_CHANNEL_GUID, "ultravnic" },
{ NULL_UUID_LE, NULL } {}
}; };
MODULE_DEVICE_TABLE(visorbus, visornic_channel_types); MODULE_DEVICE_TABLE(visorbus, visornic_channel_types);
/* /*
...@@ -52,7 +52,7 @@ MODULE_DEVICE_TABLE(visorbus, visornic_channel_types); ...@@ -52,7 +52,7 @@ MODULE_DEVICE_TABLE(visorbus, visornic_channel_types);
* must be added to scripts/mode/file2alias.c, etc., to get this working * must be added to scripts/mode/file2alias.c, etc., to get this working
* properly. * properly.
*/ */
MODULE_ALIAS("visorbus:" VISOR_VNIC_CHANNEL_UUID_STR); MODULE_ALIAS("visorbus:" VISOR_VNIC_CHANNEL_GUID_STR);
struct chanstat { struct chanstat {
unsigned long got_rcv; unsigned long got_rcv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment