summaryrefslogtreecommitdiff
path: root/include/linux/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2016-11-11 23:43:12 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-31 22:31:48 +0300
commitaef01aad89e457e34a60ff6e8fd69ff6740cf201 (patch)
treea1a02536fd46b11f05e8e804f018b8384068e45a /include/linux/input
parentb1fe0cf06f92ff8ebe77959810ec3ff2555ff56c (diff)
downloadlinux-aef01aad89e457e34a60ff6e8fd69ff6740cf201.tar.xz
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,
unsigned int rows, unsigned int cols,
unsigned short *keymap,
struct input_dev *input_dev);
+int matrix_keypad_parse_properties(struct device *dev,
+ unsigned int *rows, unsigned int *cols);
-#ifdef CONFIG_OF
-/**
- * matrix_keypad_parse_of_params() - Read parameters from matrix-keypad node
- *
- * @dev: Device containing of_node
- * @rows: Returns number of matrix rows
- * @cols: Returns number of matrix columns
- * @return 0 if OK, <0 on error
- */
-int matrix_keypad_parse_of_params(struct device *dev,
- unsigned int *rows, unsigned int *cols);
-#else
-static inline int matrix_keypad_parse_of_params(struct device *dev,
- unsigned int *rows, unsigned int *cols)
-{
- return -ENOSYS;
-}
-#endif /* CONFIG_OF */
+#define matrix_keypad_parse_of_params matrix_keypad_parse_properties
#endif /* _MATRIX_KEYPAD_H */