hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/input/touchscreen/hideep.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2012-2017 Hideep, Inc.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License version 2
6
- * as published by the Free Software Foudation.
74 */
85
96 #include <linux/module.h>
....@@ -821,8 +818,7 @@
821818 if (error)
822819 return error;
823820
824
- ts->key_num = device_property_read_u32_array(dev, "linux,keycodes",
825
- NULL, 0);
821
+ ts->key_num = device_property_count_u32(dev, "linux,keycodes");
826822 if (ts->key_num > HIDEEP_KEY_MAX) {
827823 dev_err(dev, "too many keys defined: %d\n",
828824 ts->key_num);