diff options
Diffstat (limited to 'backend/drm/gen_pnpids.sh')
-rwxr-xr-x | backend/drm/gen_pnpids.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/drm/gen_pnpids.sh b/backend/drm/gen_pnpids.sh index 80e5542d..5a9547ae 100755 --- a/backend/drm/gen_pnpids.sh +++ b/backend/drm/gen_pnpids.sh @@ -13,12 +13,11 @@ gen_pnps() } cat << EOF -#include <stdint.h> -#include <stddef.h> #include "backend/drm/util.h" + #define PNP_ID(a, b, c) ((a & 0x1f) << 10) | ((b & 0x1f) << 5) | (c & 0x1f) -const char *get_pnp_manufacturer(uint16_t code) { - switch (code) { +const char *get_pnp_manufacturer(const char code[static 3]) { + switch (PNP_ID(code[0], code[1], code[2])) { $(gen_pnps) } return NULL; |