As noted in another comment, there is [US] case law suggesting that interfacing to the program
is fair use, no matter how it's done.
There clearly IS an API that drivers and modules use, it just isn't "stable" or "published".
Except that it's sort-of-published. And it clearly is stable for a given release of the kernel
(a device manufacturer is likely to use the same release for a number of products over an
extended period).
Again, this is a very gray area - assuming courts would come down one way or the other is
accepting significant risk.