martinezjavier / ldd3

Linux Device Drivers 3 examples updated to work in recent kernels
http://examples.oreilly.com/9780596005900/
Other
2.35k stars 905 forks source link

<linux/genhd.h> has been removed but referenced in sbull.c #76

Closed YanyangChen closed 1 year ago

YanyangChen commented 1 year ago

Seems the kernel community made a decision to remove <linux/genhd.h> and used "block/blk.h" instead.

https://lore.kernel.org/all/9bb3f4c6-4e21-e1d7-b4e1-f65d273cd3f8@nvidia.com/t/#Z2e.:..:20220124093913.742411-2-hch::40lst.de

Thus the compile of sbull.c is broken in the current kernel version 5.19

https://github.com/martinezjavier/ldd3/blob/dd5c9c77a772a03c6e52adf6908bce0882e59b55/sbull/sbull.c#L28

some interfaces like *blk_alloc_queue were also broken