Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irq_to_desc shouldn't be used in modules. Newer kernels don't export it. #18

Open
SysGh-st opened this issue Apr 15, 2021 · 3 comments
Open

Comments

@SysGh-st
Copy link

SysGh-st commented Apr 15, 2021

Around line 796, there's irq_to_desc which shouldn't be used in a module. afaik, it's for kernel use only.
See https://patchwork.kernel.org/project/linux-rdma/patch/[email protected]/
Kernel 5.10 and on won't export irq_to_desc any longer. As mentioned, it is to stop the abuse of it.

From now on this usage will only result in an undefined error:
ERROR: modpost: "irq_to_desc" [/home/sysghost/Sources/spi-ch341-usb/spi-ch341-usb.ko] undefined!

EDIT: More information about this:
https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/

@xboxplayer9889
Copy link

What do you think about changing line 800 of spi-ch341-usb.c to
ch341_dev->irq_descs[i] = irq_data_to_desc( irq_get_irq_data(ch341_dev->irq_base + i) );

I think it should work...

@koalabi
Copy link

koalabi commented May 28, 2022

Hello, I have tried xboxplayer9889's proposed fix and it seems to work. Will do further testing ...

@koalabi
Copy link

koalabi commented May 28, 2022

(tried the same with i2c-ch341-usb, compiles OK and seems to work to)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants