Commit f1fb417
scsi: sg: Make sg_sysfs_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 sg_sysfs_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-1-b9096b990e27@marliere.net
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent db06ae7 commit f1fb417
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1428 | 1430 | | |
1429 | 1431 | | |
1430 | 1432 | | |
| |||
1526 | 1528 | | |
1527 | 1529 | | |
1528 | 1530 | | |
1529 | | - | |
| 1531 | + | |
1530 | 1532 | | |
1531 | 1533 | | |
1532 | 1534 | | |
| |||
1616 | 1618 | | |
1617 | 1619 | | |
1618 | 1620 | | |
1619 | | - | |
| 1621 | + | |
1620 | 1622 | | |
1621 | 1623 | | |
1622 | 1624 | | |
| |||
1687 | 1689 | | |
1688 | 1690 | | |
1689 | 1691 | | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
| 1692 | + | |
| 1693 | + | |
1693 | 1694 | | |
1694 | | - | |
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
1703 | | - | |
| 1703 | + | |
1704 | 1704 | | |
1705 | 1705 | | |
1706 | 1706 | | |
| |||
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
1718 | | - | |
| 1718 | + | |
1719 | 1719 | | |
1720 | 1720 | | |
1721 | 1721 | | |
| |||
0 commit comments