About THIS_MODULE
John Garry <[email protected]>
| Newsgroups | org.kernel.vger.linux-modules |
|---|---|
| Organization | Oracle Corporation |
| Message-ID | <[email protected]> |
Hi all, I have a query which I hope someone can advise on. I am adding a library API which requires a driver to pass the driver module pointer to the API. So we use THIS_MODULE for that purpose. However, adding a sanity check in the library to ensure that pointer is set is a challenge. Normally we would check that the module pointer is non-NULL. However, for a built-in driver module, THIS_MODULE is NULL, so rely on the non-NULL check. Any idea how to deal with this? Cheers