vfio-mdev: 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. Cc: Kirti Wankhede <kwankhede@nvidia.com> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:

committed by
Alex Williamson

parent
8834f5600c
commit
278bca7f31
@@ -55,7 +55,7 @@ static ssize_t create_store(struct kobject *kobj, struct device *dev,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
char *str;
|
||||
uuid_le uuid;
|
||||
guid_t uuid;
|
||||
int ret;
|
||||
|
||||
if ((count < UUID_STRING_LEN) || (count > UUID_STRING_LEN + 1))
|
||||
@@ -65,12 +65,12 @@ static ssize_t create_store(struct kobject *kobj, struct device *dev,
|
||||
if (!str)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = uuid_le_to_bin(str, &uuid);
|
||||
ret = guid_parse(str, &uuid);
|
||||
kfree(str);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = mdev_device_create(kobj, dev, uuid);
|
||||
ret = mdev_device_create(kobj, dev, &uuid);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user