Hi.
I am working on a PPC860.
I have developped two drivers.
The driver 2 needs to use functions that are in driver 1.
driver 1 is /dev/visu.
I thought I could make fd=open("/dev/visu", 0) in init of the driver 2 but I
get ooops.
I also need to make something like ioctl(fd, IO_Special... )but the function
ioctl is unknown in the kernel.
What is the right way to work when you need to do that ?
Thanks.
Chris
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
On 06/27/2003 07:10 PM Christophe.LINDHEIMER@fr.thalesgroup.com wrote:
Hi.
I am working on a PPC860.
I have developped two drivers.
The driver 2 needs to use functions that are in driver 1.
driver 1 is /dev/visu.
I thought I could make fd=open("/dev/visu", 0) in init of the driver 2 but I
get ooops.
For file access within the kernel see for example:
http://www.fenrus.demon.nl/kernel.html
I also need to make
I also need to make something like ioctl(fd, IO_Special... )but the function
ioctl is unknown in the kernel.
What is the right way to work when you need to do that ?
Using file access in the kernel is usually a bad thing. I think it's
easier and more straightforward to provide a small set of exported
kernel functions which the second (driver) module can use.
Hope it helps.
Wolfgang.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
On Fri, 27 Jun 2003 Christophe.LINDHEIMER@fr.thalesgroup.com wrote:
Hi.
I am working on a PPC860.
I have developped two drivers.
The driver 2 needs to use functions that are in driver 1.
driver 1 is /dev/visu.
I thought I could make fd=open("/dev/visu", 0) in init of the driver 2 but I
get ooops.
Kernel file opening is usually considered a very bad idea. If driver 2
needs some of driver 1 functions, then you should consider exporting these
functions from driver 1 (EXPORT(driver1_function);).
Once driver1 is loaded, and thus initialized, any other driver will be
able to call driver 1 exported functions.
Hope this helps,
Samuel.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/