Commit 70da641
iio: temperature: tmp007: use device-managed functions in probe
This change converts the driver to use device-managed functions in the
probe function. The power-down call is handled now via a
devm_add_action_or_reset() hook, and then devm_iio_device_register() can be
used to register the IIO device.
The final aim here would be for IIO to export only the device-managed
functions of it's API. That's a long way to go and this a small step in
that direction.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210310093800.45822-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent 218bc53 commit 70da641
1 file changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
| |||
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
492 | 503 | | |
493 | 504 | | |
494 | 505 | | |
| |||
502 | 513 | | |
503 | 514 | | |
504 | 515 | | |
505 | | - | |
| 516 | + | |
506 | 517 | | |
507 | 518 | | |
508 | 519 | | |
509 | 520 | | |
510 | 521 | | |
511 | 522 | | |
512 | 523 | | |
513 | | - | |
| 524 | + | |
514 | 525 | | |
515 | 526 | | |
516 | 527 | | |
| |||
519 | 530 | | |
520 | 531 | | |
521 | 532 | | |
522 | | - | |
| 533 | + | |
523 | 534 | | |
524 | 535 | | |
525 | 536 | | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
| 537 | + | |
543 | 538 | | |
544 | 539 | | |
545 | 540 | | |
| |||
582 | 577 | | |
583 | 578 | | |
584 | 579 | | |
585 | | - | |
586 | 580 | | |
587 | 581 | | |
588 | 582 | | |
| |||
0 commit comments