Rémi Bernon : winebus.sys: Remove unnecessary internal bus ids.
Alexandre Julliard
julliard at winehq.org
Mon Sep 20 16:26:21 CDT 2021
Module: wine
Branch: master
Commit: 7608538b40ed3e72f9ed26900268023630c43ade
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7608538b40ed3e72f9ed26900268023630c43ade
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Mon Sep 20 09:37:06 2021 +0200
winebus.sys: Remove unnecessary internal bus ids.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winebus.sys/bus_iohid.c | 3 ---
dlls/winebus.sys/bus_sdl.c | 2 --
dlls/winebus.sys/bus_udev.c | 6 ------
dlls/winebus.sys/main.c | 2 +-
dlls/winebus.sys/unixlib.c | 4 ----
dlls/winebus.sys/unixlib.h | 6 ++----
6 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c
index b1c11ee22ec..71efd6cedcc 100644
--- a/dlls/winebus.sys/bus_iohid.c
+++ b/dlls/winebus.sys/bus_iohid.c
@@ -106,8 +106,6 @@ static IOHIDManagerRef hid_manager;
static CFRunLoopRef run_loop;
static struct list event_queue = LIST_INIT(event_queue);
static struct list device_list = LIST_INIT(device_list);
-
-static const WCHAR busidW[] = {'I','O','H','I','D',0};
static struct iohid_bus_options options;
struct platform_private
@@ -266,7 +264,6 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
{
struct device_desc desc =
{
- .busid = busidW,
.input = -1,
.serialnumber = {"0000"},
};
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
index a446eb77375..b7734b4016e 100644
--- a/dlls/winebus.sys/bus_sdl.c
+++ b/dlls/winebus.sys/bus_sdl.c
@@ -65,7 +65,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
static pthread_mutex_t sdl_cs = PTHREAD_MUTEX_INITIALIZER;
-static const WCHAR sdl_busidW[] = {'S','D','L','J','O','Y',0};
static struct sdl_bus_options options;
static void *sdl_handle = NULL;
@@ -712,7 +711,6 @@ static void sdl_add_device(unsigned int index)
{
struct device_desc desc =
{
- .busid = sdl_busidW,
.input = -1,
.manufacturer = {"SDL"},
.serialnumber = {"0000"},
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index cd9b065e56b..1c1b7da78cf 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -100,9 +100,6 @@ static struct udev_monitor *udev_monitor;
static int deviceloop_control[2];
static struct list event_queue = LIST_INIT(event_queue);
static struct list device_list = LIST_INIT(device_list);
-
-static const WCHAR hidraw_busidW[] = {'H','I','D','R','A','W',0};
-static const WCHAR lnxev_busidW[] = {'L','N','X','E','V',0};
static struct udev_bus_options options;
struct platform_private
@@ -985,7 +982,6 @@ static void udev_add_device(struct udev_device *dev)
subsystem = udev_device_get_subsystem(dev);
if (!strcmp(subsystem, "hidraw"))
{
- desc.busid = hidraw_busidW;
if (!desc.manufacturer[0]) strcpy(desc.manufacturer, "hidraw");
#ifdef HAVE_LINUX_HIDRAW_H
@@ -998,8 +994,6 @@ static void udev_add_device(struct udev_device *dev)
{
struct input_id device_id = {0};
- desc.busid = lnxev_busidW;
-
if (ioctl(fd, EVIOCGID, &device_id) < 0)
WARN("ioctl(EVIOCGID) failed: %d %s\n", errno, strerror(errno));
else
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
index 0fd7a405f80..ffe54fcbf87 100644
--- a/dlls/winebus.sys/main.c
+++ b/dlls/winebus.sys/main.c
@@ -294,7 +294,7 @@ static DEVICE_OBJECT *bus_create_hid_device(struct device_desc *desc, struct uni
TRACE("desc %s, unix_device %p\n", debugstr_device_desc(desc), unix_device);
- swprintf(dev_name, ARRAY_SIZE(dev_name), L"\\Device\\%s#%p", desc->busid, unix_device);
+ swprintf(dev_name, ARRAY_SIZE(dev_name), L"\\Device\\WINEBUS#%p", unix_device);
RtlInitUnicodeString(&nameW, dev_name);
status = IoCreateDevice(driver_obj, sizeof(struct device_extension), &nameW, 0, 0, FALSE, &device);
if (status)
diff --git a/dlls/winebus.sys/unixlib.c b/dlls/winebus.sys/unixlib.c
index 6b6a2595ca0..893296e8ebb 100644
--- a/dlls/winebus.sys/unixlib.c
+++ b/dlls/winebus.sys/unixlib.c
@@ -139,10 +139,8 @@ static const struct unix_device_vtbl mouse_vtbl =
mouse_set_feature_report,
};
-static const WCHAR mouse_bus_id[] = {'W','I','N','E','M','O','U','S','E',0};
static const struct device_desc mouse_device_desc =
{
- .busid = mouse_bus_id,
.vid = 0x845e,
.pid = 0x0001,
.input = -1,
@@ -239,10 +237,8 @@ static const struct unix_device_vtbl keyboard_vtbl =
keyboard_set_feature_report,
};
-static const WCHAR keyboard_bus_id[] = {'W','I','N','E','K','E','Y','B','O','A','R','D',0};
static const struct device_desc keyboard_device_desc =
{
- .busid = keyboard_bus_id,
.vid = 0x845e,
.pid = 0x0002,
.input = -1,
diff --git a/dlls/winebus.sys/unixlib.h b/dlls/winebus.sys/unixlib.h
index a088cb1266b..317599571c2 100644
--- a/dlls/winebus.sys/unixlib.h
+++ b/dlls/winebus.sys/unixlib.h
@@ -32,7 +32,6 @@
struct device_desc
{
- const WCHAR *busid;
DWORD vid;
DWORD pid;
DWORD version;
@@ -139,9 +138,8 @@ enum unix_funcs
static inline const char *debugstr_device_desc(struct device_desc *desc)
{
if (!desc) return "(null)";
- return wine_dbg_sprintf("{busid %s, vid %04x, pid %04x, version %04x, input %d, uid %08x, is_gamepad %u}",
- debugstr_w(desc->busid), desc->vid, desc->pid, desc->version,
- desc->input, desc->uid, desc->is_gamepad);
+ return wine_dbg_sprintf("{vid %04x, pid %04x, version %04x, input %d, uid %08x, is_gamepad %u}",
+ desc->vid, desc->pid, desc->version, desc->input, desc->uid, desc->is_gamepad);
}
#endif /* __WINEBUS_UNIXLIB_H */
More information about the wine-cvs
mailing list