LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-06-2012, 10:31 AM   #1
SuperSpry
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
Having trouble calling my kernel module in device drivers


Completely new to open source development, so please excuse the ignorance.

I wrote a kernel-space API module that is used by device drivers, but I'm having some trouble getting the drivers to successfully call functions in my API.

In the driver there's a #include <linux/mycode.h>. I then built and loaded my module and placed the mycode.h file in the <kernel>/include/linux directory. But when I try to build the driver module, I get warnings saying that the functions in my API are undefined. So the driver knows about them but can't see the implementation of them (the code in mycode.c) I guess. Why is that?

My impression was that when a module is loaded, everything from the mycode.c file is loaded into the kernel and that a driver could call that code as long as I #include the mycode.h file in that driver. But clearly I'm missing something.

Any thoughts?

Last edited by SuperSpry; 09-06-2012 at 03:47 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kernel code: calling suspend to ram function from keyboard module belvy Linux - Kernel 11 05-18-2012 07:12 AM
Trouble installing drivers for wireless usb device in Backtrack 5 toneloc51 Linux - Networking 5 03-22-2012 09:49 PM
Calling a system call in a kernel module linuxdoniv Programming 3 08-08-2008 03:28 AM
Linux Device Drivers, Third Edition --- scull module??? Igor007 Programming 2 09-09-2005 05:05 PM
Sample module coding: Linux Device Drivers leosgb Programming 0 12-29-2004 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration