Commit 9460eaa
committed
ACPI: SBS: Convert the driver to a platform one
While binding drivers directly to struct acpi_device objects allows
basic functionality to be provided, at least in the majority of cases,
there are some problems with it, related to general consistency, sysfs
layout, power management operation ordering, and code cleanliness.
Overall, it is better to bind drivers to platform devices than to their
ACPI companions, so convert the ACPI smart battery subsystem (SBS)
driver to a platform one.
After this conversion, acpi_smbus_hc_probe() does not need to populate the
driver_data pointer of the SMBUS HC platform device's ACPI companion any
more, so update it accordingly.
While this is not expected to alter functionality, it changes sysfs
layout and so it will be visible to user space.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3390477.aeNJFYEL58@rafael.j.wysocki1 parent 6d25905 commit 9460eaa
2 files changed
Lines changed: 21 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
631 | | - | |
| 632 | + | |
632 | 633 | | |
| 634 | + | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
| |||
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
646 | 650 | | |
647 | 651 | | |
648 | 652 | | |
649 | | - | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
| |||
670 | 673 | | |
671 | 674 | | |
672 | 675 | | |
673 | | - | |
| 676 | + | |
674 | 677 | | |
675 | 678 | | |
676 | 679 | | |
677 | | - | |
| 680 | + | |
678 | 681 | | |
679 | | - | |
| 682 | + | |
680 | 683 | | |
681 | 684 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | 685 | | |
688 | 686 | | |
689 | 687 | | |
| |||
697 | 695 | | |
698 | 696 | | |
699 | 697 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 698 | + | |
705 | 699 | | |
706 | 700 | | |
707 | 701 | | |
| |||
710 | 704 | | |
711 | 705 | | |
712 | 706 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
722 | 715 | | |
723 | | - | |
| 716 | + | |
| 717 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
| |||
0 commit comments