diff mbox series

hid: Add BUS_VIRTUAL to hid_connect logging

Message ID 20210503163937.34889-1-mark@bolhuis.dev (mailing list archive)
State Mainlined
Commit 48e33befe61a7d407753c53d1a06fc8d6b5dab80
Delegated to: Jiri Kosina
Headers show
Series hid: Add BUS_VIRTUAL to hid_connect logging | expand

Commit Message

Mark Bolhuis May 3, 2021, 4:39 p.m. UTC
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 <mark@bolhuis.dev>
---
 drivers/hid/hid-core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jiri Kosina May 5, 2021, 1:09 p.m. UTC | #1
On Mon, 3 May 2021, Mark Bolhuis wrote:

> 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 <mark@bolhuis.dev>
> ---
>  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.
diff mbox series

Patch

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>";
 	}