michael firth writes:
> I'm trying to add devfs support to my driver, and wonder what is the
> suggested method of determining if the kernel the driver is loaded into is
> running devfs.
>
> I could just use CONFIG_DEVFS_FS, but this only indicates if the
> kernel that the module was compiled against was running devfs, and
> isn't safe against a kernel rebuild.
Binary modules are not safe against kernel rebuilds anyway, so just
give up on the idea. Any time the kernel configuration changes, you
*MUST* recompile modules.
So just make your calls into the devfs API. There is no need to wrap
them in #ifdef CONFIG_DEVFS_FS, since the header file takes care of
this.
> Also, what is the recommended replacement for checking the major and
> minor device numbers in a call to open - is it to use
> 'devfs_get_handle_from_inode', and compare with the handle returned
> from 'devfs_register'?
I don't really understand your question. What is it you're trying to
do?
BTW: does this module require devfs, or does it just support devfs?
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|