.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/module.h> |
---|
.. | .. |
---|
821 | 818 | if (error) |
---|
822 | 819 | return error; |
---|
823 | 820 | |
---|
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"); |
---|
826 | 822 | if (ts->key_num > HIDEEP_KEY_MAX) { |
---|
827 | 823 | dev_err(dev, "too many keys defined: %d\n", |
---|
828 | 824 | ts->key_num); |
---|