Commit 64965b8
vfio: replace vfio->device_class with a const struct class
The class_create() call has been deprecated in favor of class_register()
as the driver core now allows for a struct class to be in read-only
memory. Replace vfio->device_class with a const struct class and drop
the class_create() call.
Compile tested with both CONFIG_VFIO_DEVICE_CDEV on and off (and
CONFIG_VFIO on); found no errors/warns in dmesg.
Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
Suggested-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Jori Koolstra <[email protected]>
[Remove unused vfio_cdev_init() args]
Signed-off-by: Alex Williamson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent b0eab97 commit 64965b8
3 files changed
Lines changed: 19 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | 298 | | |
305 | 299 | | |
306 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
299 | 308 | | |
300 | 309 | | |
301 | 310 | | |
302 | | - | |
| 311 | + | |
303 | 312 | | |
304 | 313 | | |
305 | 314 | | |
| |||
1804 | 1813 | | |
1805 | 1814 | | |
1806 | 1815 | | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
| 1816 | + | |
| 1817 | + | |
1810 | 1818 | | |
1811 | | - | |
1812 | 1819 | | |
1813 | | - | |
| 1820 | + | |
1814 | 1821 | | |
1815 | 1822 | | |
1816 | 1823 | | |
| |||
1819 | 1826 | | |
1820 | 1827 | | |
1821 | 1828 | | |
1822 | | - | |
1823 | | - | |
| 1829 | + | |
1824 | 1830 | | |
1825 | 1831 | | |
1826 | 1832 | | |
| |||
1833 | 1839 | | |
1834 | 1840 | | |
1835 | 1841 | | |
1836 | | - | |
1837 | | - | |
| 1842 | + | |
1838 | 1843 | | |
1839 | 1844 | | |
1840 | 1845 | | |
| |||
0 commit comments