Commit 3c6e73e
committed
gpiolib: devres: shrink devm_gpiochip_add_data_with_key()
If all we want to manage is a single pointer, there's no need to
manually allocate and add a new devres. We can simply use
devm_add_action_or_reset() and shrink the code by a good bit.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>1 parent 37174f3 commit 3c6e73e
1 file changed
+4
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
509 | 508 | | |
510 | 509 | | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | 510 | | |
517 | | - | |
518 | | - | |
| 511 | + | |
519 | 512 | | |
520 | | - | |
521 | 513 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
| 514 | + | |
526 | 515 | | |
527 | 516 | | |
0 commit comments