Bongani Hlope schrieb:
On Monday 31 March 2008 11:50:12 Bernd Büttner wrote:
Bongani Hlope schrieb:
On Monday 31 March 2008 11:04:13 Bernd Büttner wrote:
Hi,
I'm using distribution 20070130 on platform m68knommu.
In my device driver that is loaded during startup, not compiled in, I
must use sys_open, sys_close, sys_read, sys_write and sys_ioctl.
sys_write and sys_ioctl are not exported.
Is it ok to add following lines to m68k_ksyms.c:
#include <linux/syscalls.h>
EXPORT_SYMBOL(sys_write);
EXPORT_SYMBOL(sys_ioctl);
or is there a better way to access these functions from kernel-mode
drivers?
Those are system calls, they don't need EXPORT_SYMBOL. There are some
kernel module that uses those, but since we don't know what error you are
getting it is hard to give a good answer.
The driver is linked as module and the linker shows a warning:
WARNING: "sys_write" [drivers/mkc/mkcext_4108.ko] undefined!
exporting sys_write as described above eliminates the warning.
You really shouldn't be doing that in a module, that is why those symbols are
not exported. But if you really insist on reading/writing a file in a kernel
module look here: http://www.linuxjournal.com/article/8110 it has both the
lengthy warning and examples of how to do it if you insist on doing
the "wrong" thing
Thank you for the hint.
I read the article and understand the problems.
But I don't want to read from a file. I just want to read and write single bytes
from and to a qspi-device. If I don't want to rewrite the qspi functions I have
to call
the qspi-driver.
So what I'm searching for is a way to read/write a qspi-device from kernel mode
without
the indirection through user-mode.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev