mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
b1fe0cf06f
commit
aef01aad89
12 changed files with 75 additions and 86 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue