accessing static device functions or file operations from a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have written a module for the purpose of writing to an MTD device.
I would like my module to call the "mtd_write()" function found in
drivers/mtd/mtdchar.c, but it is declared static.

I know the mtd_write() can be called by opening a device (eg.
/dev/mtd/4) from userspace and calling write() on it -- the
file_operations dispatch table passes control to mtd_write().  But I
don't know how to use this from a module.

Is it possible to just open() and write() to a device from a module?

Thanks,
Dave


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux