Commit 1f92d6a
vfio/mdpy: make mdpy_class constant
Since commit 43a7206 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the mdpy_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240301-class_cleanup-vfio-v1-1-9236d69083f5@marliere.net
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>1 parent fd94213 commit 1f92d6a
1 file changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
| 714 | + | |
| 715 | + | |
716 | 716 | | |
717 | | - | |
718 | | - | |
| 717 | + | |
719 | 718 | | |
720 | 719 | | |
721 | 720 | | |
| |||
735 | 734 | | |
736 | 735 | | |
737 | 736 | | |
738 | | - | |
| 737 | + | |
739 | 738 | | |
740 | 739 | | |
741 | 740 | | |
| |||
753 | 752 | | |
754 | 753 | | |
755 | 754 | | |
756 | | - | |
757 | | - | |
| 755 | + | |
758 | 756 | | |
759 | 757 | | |
760 | 758 | | |
| |||
0 commit comments