Re: Problem with PCI

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

 



On Mon, Sep 17, 2001 at 06:23:31PM -0500, Chester Rebeiro wrote:
> Thanks for the many replies. The code is compiling as a kernel module...

Ehm, then why is that main() in the code? There really isn't such thing
as executing main() in kernel. I think you should download a copy of
the Rubini Device Driver book (for a pointer, see
http://www.kernelnewbies.org/books.php3 ).

> and is also getting inserted ...however the printk doesn't seem to print
> to the linux console...i have used
> 	printk("<1> ....\n");

Well, that doesn't surprise me if you only use main() as your function.
Kernel modules are initialised with module_init(init_function). Have a
look at a simple module, like my procfs example in
Documentation/DocBook/procfs_example.c .

BTW: don't use "<1>" directly but use definitions like KERN_ALERT
and friends from include/linux/kernel.h. In that way you are still
source level compatible when the kernel hackers decide on a different
way to denote the log levels.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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