Subject: Re: How to find device in lkm.
To: Jachym Holecek <freza@liberouter.org>
From: Tomofumi Hayashi <tom.hayashi@alaxala.com>
List: tech-kern
Date: 12/16/2004 12:52:24
Hi,
At Wed, 15 Dec 2004 13:12:17 +0100,
Jachym Holecek wrote:
> > In kern/kern_subr.c, a function "finddevice" enables to retrieve a
> > device information by its name, however, lkm can't call the function.
>
> ... because finddevice() is static. But maybe net/if.c:ifunit() might
> be more useful to you as you mentioned you'll work with network
> interfaces (finddevice() gives you 'struct device *', ifunit() gives
> 'struct ifnet *').
Thanks for your reply. I've know about the reason(static) therefore I really
know how to access 'struct device *' legally. NetBSD has a autoconfig
framework, I think it may have a way.
regards,
--
Tomofumi