[PATCH] hid: Add BUS_VIRTUAL to hid_connect logging

Subsystems: hid core layer, the rest

STALE1958d

2 messages, 2 authors, 2021-05-05 · open the first message on its own page

[PATCH] hid: Add BUS_VIRTUAL to hid_connect logging

From: Mark Bolhuis <hidden>
Date: 2021-05-03 16:44:41

Add BUS_VIRTUAL to hid_connect logging since it's a valid hid bus type and it should not print <UNKNOWN>

Signed-off-by: Mark Bolhuis <redacted>
---
 drivers/hid/hid-core.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0ae9f6df59d1..265cbe592374 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2005,6 +2005,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 	case BUS_I2C:
 		bus = "I2C";
 		break;
+	case BUS_VIRTUAL:
+		bus = "VIRTUAL";
+		break;
 	default:
 		bus = "<UNKNOWN>";
 	}
-- 
2.31.1

Re: [PATCH] hid: Add BUS_VIRTUAL to hid_connect logging

From: Jiri Kosina <jikos@kernel.org>
Date: 2021-05-05 13:09:28

On Mon, 3 May 2021, Mark Bolhuis wrote:
quoted hunk
Add BUS_VIRTUAL to hid_connect logging since it's a valid hid bus type and it should not print <UNKNOWN>

Signed-off-by: Mark Bolhuis <redacted>
---
 drivers/hid/hid-core.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0ae9f6df59d1..265cbe592374 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2005,6 +2005,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 	case BUS_I2C:
 		bus = "I2C";
 		break;
+	case BUS_VIRTUAL:
+		bus = "VIRTUAL";
+		break;
 	default:
 		bus = "<UNKNOWN>";
 	}
Applied, thanks Mark.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help