summaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2016-11-11 15:43:12 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-31 14:31:48 -0500
commitaef01aad89e457e34a60ff6e8fd69ff6740cf201 (patch)
treea1a02536fd46b11f05e8e804f018b8384068e45a /include/linux/input
parentb1fe0cf06f92ff8ebe77959810ec3ff2555ff56c (diff)
Input: matrix-keypad - switch to using generic device properties
Instead of being OF-specific, let's switch to using generic device properties, which will make this code usable on ACPI, device tree and legacy boards that use property sets. As part of the change let's rename matrix_keypad_parse_of_params() to matrix_keypad_parse_properties(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/matrix_keypad.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 27e06acc509a..37b04a0fdea4 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -80,24 +80,9 @@ int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
80 unsigned int rows, unsigned int cols, 80 unsigned int rows, unsigned int cols,
81 unsigned short *keymap, 81 unsigned short *keymap,
82 struct input_dev *input_dev); 82 struct input_dev *input_dev);
83int matrix_keypad_parse_properties(struct device *dev,
84 unsigned int *rows, unsigned int *cols);
83 85
84#ifdef CONFIG_OF 86#define matrix_keypad_parse_of_params matrix_keypad_parse_properties
85/**
86 * matrix_keypad_parse_of_params() - Read parameters from matrix-keypad node
87 *
88 * @dev: Device containing of_node
89 * @rows: Returns number of matrix rows
90 * @cols: Returns number of matrix columns
91 * @return 0 if OK, <0 on error
92 */
93int matrix_keypad_parse_of_params(struct device *dev,
94 unsigned int *rows, unsigned int *cols);
95#else
96static inline int matrix_keypad_parse_of_params(struct device *dev,
97 unsigned int *rows, unsigned int *cols)
98{
99 return -ENOSYS;
100}
101#endif /* CONFIG_OF */
102 87
103#endif /* _MATRIX_KEYPAD_H */ 88#endif /* _MATRIX_KEYPAD_H */