Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: twl4030_keypad - drop support for platform data

Support for platform data from dropped from twl in 4a346a03a63c ("mfd:
twl: Remove platform data support") and board files were dropped even
earlier. There are no in-kernel users of twl4030_keypad_data in the
kernel, and the driver supports configuration via generic device
properties.

Drop support of static platform data from the keypad driver.

Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://lore.kernel.org/r/tica7ol7xwv5tqb7hlkzu6wkiv4quxwrpqv6croe4wfnwvj6wv@4ob6ktqqi3cr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+6 -29
+6 -29
drivers/input/keyboard/twl4030_keypad.c
··· 28 28 * an internal state machine that decodes pressed keys, including 29 29 * multi-key combinations. 30 30 * 31 - * This driver lets boards define what keycodes they wish to report for 32 - * which scancodes, as part of the "struct twl4030_keypad_data" used in 33 - * the probe() routine. 34 - * 35 31 * See the TPS65950 documentation; that's the general availability 36 32 * version of the TWL5030 second generation part. 37 33 */ ··· 43 47 struct twl4030_keypad { 44 48 unsigned short keymap[TWL4030_KEYMAP_SIZE]; 45 49 u16 kp_state[TWL4030_MAX_ROWS]; 46 - bool autorepeat; 47 50 unsigned int n_rows; 48 51 unsigned int n_cols; 49 52 int irq; ··· 317 322 */ 318 323 static int twl4030_kp_probe(struct platform_device *pdev) 319 324 { 320 - struct twl4030_keypad_data *pdata = dev_get_platdata(&pdev->dev); 321 - const struct matrix_keymap_data *keymap_data = NULL; 322 325 struct twl4030_keypad *kp; 323 326 struct input_dev *input; 324 327 u8 reg; ··· 343 350 input->id.product = 0x0001; 344 351 input->id.version = 0x0003; 345 352 346 - if (pdata) { 347 - if (!pdata->rows || !pdata->cols || !pdata->keymap_data) { 348 - dev_err(&pdev->dev, "Missing platform_data\n"); 349 - return -EINVAL; 350 - } 351 - 352 - kp->n_rows = pdata->rows; 353 - kp->n_cols = pdata->cols; 354 - kp->autorepeat = pdata->rep; 355 - keymap_data = pdata->keymap_data; 356 - } else { 357 - error = matrix_keypad_parse_properties(&pdev->dev, &kp->n_rows, 358 - &kp->n_cols); 359 - if (error) 360 - return error; 361 - 362 - kp->autorepeat = true; 363 - } 353 + error = matrix_keypad_parse_properties(&pdev->dev, 354 + &kp->n_rows, &kp->n_cols); 355 + if (error) 356 + return error; 364 357 365 358 if (kp->n_rows > TWL4030_MAX_ROWS || kp->n_cols > TWL4030_MAX_COLS) { 366 359 dev_err(&pdev->dev, ··· 358 379 if (kp->irq < 0) 359 380 return kp->irq; 360 381 361 - error = matrix_keypad_build_keymap(keymap_data, NULL, 382 + error = matrix_keypad_build_keymap(NULL, NULL, 362 383 TWL4030_MAX_ROWS, 363 384 1 << TWL4030_ROW_SHIFT, 364 385 kp->keymap, input); ··· 368 389 } 369 390 370 391 input_set_capability(input, EV_MSC, MSC_SCAN); 371 - /* Enable auto repeat feature of Linux input subsystem */ 372 - if (kp->autorepeat) 373 - __set_bit(EV_REP, input->evbit); 392 + __set_bit(EV_REP, input->evbit); 374 393 375 394 error = input_register_device(input); 376 395 if (error) {