History

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().

Dmitry Torokhov committed 10 years ago

Commit aef01aa1 parent b1fe0cf12 files · +73 −84Browse files

Showing the changes to include/linux/input (1 of 12 files). Show all

Unified · Split

include/linux/input/matrix_keypad.h+3−18
@@ -80,24 +80,9 @@ int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, · 79 unmodified lines
8080 unsigned int rows, unsigned int cols,
8181 unsigned short *keymap,
8282 struct input_dev *input_dev);
83+int matrix_keypad_parse_properties(struct device *dev,
84+ unsigned int *rows, unsigned int *cols);
8385
84−#ifdef CONFIG_OF
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− */
93−int matrix_keypad_parse_of_params(struct device *dev,
94− unsigned int *rows, unsigned int *cols);
95−#else
96−static 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 */
86+#define matrix_keypad_parse_of_params matrix_keypad_parse_properties
10287
10388 #endif /* _MATRIX_KEYPAD_H */