Skip to content

Commit

Permalink
drivers/mge-hid.c: check that KSTAR is the maker of KSTAR_VENDORID hi…
Browse files Browse the repository at this point in the history
…ts [#2661]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
  • Loading branch information
jimklimov committed Dec 17, 2024
1 parent a3d442e commit 1690b50
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/mge-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,15 @@ static int mge_claim(HIDDevice_t *hd) {
/* Let liebert-hid grab this */
return 0;

case KSTAR_VENDORID:
if (hd->Vendor && strstr(hd->Vendor, "KSTAR")) {
return 1;
}

/* So far we only heard of KSTAR using this ID
* in some models (or MGE 0x0463 originally) */
return 0;

default: /* Valid for Eaton */
/* by default, reject, unless the productid option is given */
if (getval("productid")) {
Expand All @@ -2251,6 +2260,15 @@ static int mge_claim(HIDDevice_t *hd) {
/* Let liebert-hid grab this */
return 0;

case KSTAR_VENDORID:
if (hd->Vendor && strstr(hd->Vendor, "KSTAR")) {
return 1;
}

/* So far we only heard of KSTAR using this ID
* in some models (or MGE 0x0463 originally) */
return 0;

default:
break;
}
Expand Down

0 comments on commit 1690b50

Please sign in to comment.