* About THIS_MODULE
@ 2026-07-03 15:33 John Garry
0 siblings, 0 replies; only message in thread
From: John Garry @ 2026-07-03 15:33 UTC (permalink / raw)
To: linux-modules
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-03 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 15:33 About THIS_MODULE John Garry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox