hms.c (0661cf74e6e5dbd585c4a5a3e621d915bb6787d3) | hms.c (6f7b5d5d3c2e4704985723d5a23a2494050d8b6b) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 205 unchanged lines hidden (view full) --- 214 215 /* Check if report descriptor belongs to mouse */ 216 error = HIDMAP_ADD_MAP(&sc->hm, hms_map, sc->caps); 217 if (error != 0) 218 return (error); 219 220 /* There should be at least one X or Y axis */ 221 if (!hidmap_test_cap(sc->caps, HMS_REL_X) && | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 205 unchanged lines hidden (view full) --- 214 215 /* Check if report descriptor belongs to mouse */ 216 error = HIDMAP_ADD_MAP(&sc->hm, hms_map, sc->caps); 217 if (error != 0) 218 return (error); 219 220 /* There should be at least one X or Y axis */ 221 if (!hidmap_test_cap(sc->caps, HMS_REL_X) && |
222 !hidmap_test_cap(sc->caps, HMS_REL_X) && | 222 !hidmap_test_cap(sc->caps, HMS_REL_Y) && |
223 !hidmap_test_cap(sc->caps, HMS_ABS_X) && 224 !hidmap_test_cap(sc->caps, HMS_ABS_Y)) 225 return (ENXIO); 226 227 if (hidmap_test_cap(sc->caps, HMS_ABS_X) || 228 hidmap_test_cap(sc->caps, HMS_ABS_Y)) 229 hidbus_set_desc(dev, "Tablet"); 230 else --- 110 unchanged lines hidden --- | 223 !hidmap_test_cap(sc->caps, HMS_ABS_X) && 224 !hidmap_test_cap(sc->caps, HMS_ABS_Y)) 225 return (ENXIO); 226 227 if (hidmap_test_cap(sc->caps, HMS_ABS_X) || 228 hidmap_test_cap(sc->caps, HMS_ABS_Y)) 229 hidbus_set_desc(dev, "Tablet"); 230 else --- 110 unchanged lines hidden --- |