Commit db704bf
phy: core: make phy_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 phy_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/20240305-class_cleanup-phy-v1-1-106013a644dc@marliere.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent 5cee04a commit db704bf
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
753 | 758 | | |
754 | 759 | | |
755 | 760 | | |
756 | | - | |
| 761 | + | |
757 | 762 | | |
758 | 763 | | |
759 | 764 | | |
| |||
1016 | 1021 | | |
1017 | 1022 | | |
1018 | 1023 | | |
1019 | | - | |
| 1024 | + | |
1020 | 1025 | | |
1021 | 1026 | | |
1022 | 1027 | | |
| |||
1285 | 1290 | | |
1286 | 1291 | | |
1287 | 1292 | | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
| 1293 | + | |
1294 | 1294 | | |
1295 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1296 | 1300 | | |
1297 | 1301 | | |
1298 | 1302 | | |
| |||
1303 | 1307 | | |
1304 | 1308 | | |
1305 | 1309 | | |
1306 | | - | |
| 1310 | + | |
1307 | 1311 | | |
1308 | 1312 | | |
0 commit comments