.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Helpers for matrix keyboard bindings |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: |
---|
7 | 8 | * Olof Johansson <olof@lixom.net> |
---|
8 | | - * |
---|
9 | | - * This software is licensed under the terms of the GNU General Public |
---|
10 | | - * License version 2, as published by the Free Software Foundation, and |
---|
11 | | - * may be copied, distributed, and modified under those terms. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | 9 | */ |
---|
18 | 10 | |
---|
19 | 11 | #include <linux/device.h> |
---|
.. | .. |
---|
89 | 81 | if (!propname) |
---|
90 | 82 | propname = "linux,keymap"; |
---|
91 | 83 | |
---|
92 | | - size = device_property_read_u32_array(dev, propname, NULL, 0); |
---|
| 84 | + size = device_property_count_u32(dev, propname); |
---|
93 | 85 | if (size <= 0) { |
---|
94 | 86 | dev_err(dev, "missing or malformed property %s: %d\n", |
---|
95 | 87 | propname, size); |
---|