Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
Subsystems (2)
PATCH 1/1 Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
As a preparation to unexport of_gpio_named_count(), convert the driver to use gpiod_count() instead.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/input/keyboard/matrix_keypad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/keyboard/matrix_keypad.c +3 -3
@@ -416,9 +416,9 @@ matrix_keypad_parse_dt(struct device *dev)return ERR_PTR (-ENOMEM ); } - pdata->num_row_gpios = nrow =of_gpio_named_count (np,"row-gpios" ); - pdata->num_col_gpios = ncol =of_gpio_named_count (np,"col-gpios" ); -if (nrow <=0 || ncol <=0 ) { + pdata->num_row_gpios = nrow =gpiod_count (dev,"row" ); + pdata->num_col_gpios = ncol =gpiod_count (dev,"col" ); +if (nrow <0 || ncol <0 ) {dev_err (dev,"number of keypad rows/columns not specified\n" );return ERR_PTR (-EINVAL ); }
Signature · 1 line
2.35.1
Quoted 4 lines · Andy Shevchenko
As a preparation to unexport
of_gpio_named_count(), convert the driver to usegpiod_count()instead.Signed-off-by Andy Shevchenko <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry