Commit a08f0eb
scsi: cxlflash: Make cxlflash_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 cxlflash_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/20240302-class_cleanup-scsi-v1-3-b9096b990e27@marliere.net
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent ee8dda6 commit a08f0eb
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
3602 | 3607 | | |
3603 | 3608 | | |
3604 | 3609 | | |
3605 | | - | |
| 3610 | + | |
3606 | 3611 | | |
3607 | 3612 | | |
3608 | 3613 | | |
| |||
3880 | 3885 | | |
3881 | 3886 | | |
3882 | 3887 | | |
3883 | | - | |
3884 | | - | |
3885 | | - | |
| 3888 | + | |
| 3889 | + | |
3886 | 3890 | | |
3887 | 3891 | | |
3888 | 3892 | | |
3889 | 3893 | | |
3890 | | - | |
3891 | 3894 | | |
3892 | 3895 | | |
3893 | 3896 | | |
| |||
3903 | 3906 | | |
3904 | 3907 | | |
3905 | 3908 | | |
3906 | | - | |
| 3909 | + | |
3907 | 3910 | | |
3908 | 3911 | | |
3909 | 3912 | | |
| |||
0 commit comments