Driver on Linux

Samuel Ortiz samuel.ortiz at smartdata.ch
Mon Jun 30 17:00:51 EST 2003


On Fri, 27 Jun 2003 Christophe.LINDHEIMER at 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/





More information about the Linuxppc-embedded mailing list