Commit 2c10e7a
USB: gadget: f_printer: make usb_gadget_class a static const structure
Now that the driver core allows for struct class to be in read-only
memory, move the usb_gadget_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at load time.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230620094412.508580-10-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e571e84 commit 2c10e7a
1 file changed
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
1120 | 1123 | | |
1121 | 1124 | | |
1122 | 1125 | | |
1123 | | - | |
| 1126 | + | |
1124 | 1127 | | |
1125 | 1128 | | |
1126 | 1129 | | |
| |||
1143 | 1146 | | |
1144 | 1147 | | |
1145 | 1148 | | |
1146 | | - | |
| 1149 | + | |
1147 | 1150 | | |
1148 | 1151 | | |
1149 | 1152 | | |
| |||
1410 | 1413 | | |
1411 | 1414 | | |
1412 | 1415 | | |
1413 | | - | |
| 1416 | + | |
1414 | 1417 | | |
1415 | 1418 | | |
1416 | 1419 | | |
| |||
1512 | 1515 | | |
1513 | 1516 | | |
1514 | 1517 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
1519 | | - | |
| 1518 | + | |
| 1519 | + | |
1520 | 1520 | | |
1521 | | - | |
1522 | 1521 | | |
1523 | 1522 | | |
1524 | 1523 | | |
1525 | 1524 | | |
1526 | | - | |
1527 | | - | |
| 1525 | + | |
1528 | 1526 | | |
1529 | 1527 | | |
1530 | 1528 | | |
| |||
1540 | 1538 | | |
1541 | 1539 | | |
1542 | 1540 | | |
1543 | | - | |
1544 | | - | |
| 1541 | + | |
1545 | 1542 | | |
0 commit comments