diff options
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r-- | net/bluetooth/hidp/core.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 46c6a148f0b3..0c699cdc3696 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -76,25 +76,19 @@ static void hidp_copy_session(struct hidp_session *session, struct hidp_conninfo | |||
76 | ci->flags = session->flags; | 76 | ci->flags = session->flags; |
77 | ci->state = BT_CONNECTED; | 77 | ci->state = BT_CONNECTED; |
78 | 78 | ||
79 | ci->vendor = 0x0000; | ||
80 | ci->product = 0x0000; | ||
81 | ci->version = 0x0000; | ||
82 | |||
83 | if (session->input) { | 79 | if (session->input) { |
84 | ci->vendor = session->input->id.vendor; | 80 | ci->vendor = session->input->id.vendor; |
85 | ci->product = session->input->id.product; | 81 | ci->product = session->input->id.product; |
86 | ci->version = session->input->id.version; | 82 | ci->version = session->input->id.version; |
87 | if (session->input->name) | 83 | if (session->input->name) |
88 | strncpy(ci->name, session->input->name, 128); | 84 | strlcpy(ci->name, session->input->name, 128); |
89 | else | 85 | else |
90 | strncpy(ci->name, "HID Boot Device", 128); | 86 | strlcpy(ci->name, "HID Boot Device", 128); |
91 | } | 87 | } else if (session->hid) { |
92 | |||
93 | if (session->hid) { | ||
94 | ci->vendor = session->hid->vendor; | 88 | ci->vendor = session->hid->vendor; |
95 | ci->product = session->hid->product; | 89 | ci->product = session->hid->product; |
96 | ci->version = session->hid->version; | 90 | ci->version = session->hid->version; |
97 | strncpy(ci->name, session->hid->name, 128); | 91 | strlcpy(ci->name, session->hid->name, 128); |
98 | } | 92 | } |
99 | } | 93 | } |
100 | 94 | ||