Re: Sample driver for 2.6

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

 



Well here's something I'm working on, It's not very large so I'll just
attach it here as I don't really have a good place to host it. It uses
the new char interface you can read about at
http://lwn.net/Articles/49684/. I'm trying to get it to support sysfs
(and udev), but am not having luck (any ideas anybody?). There are
some commented out lines that try to make a class_simple for it, but I
think it's not working because I don't have a device structure to use.

~Jake B

On Thu, 16 Dec 2004 12:17:55 +0530, Deekshit Mantampady
<dmantamp@xxxxxxxxx> wrote:
> Hi all,
> Can anybody point me to an example of a kernel module which creates a
> char. device along with all steps, including a sample program to test
> the module, I mean by opening a device and writing something to it.
> 
> Somehow, a simpel device driver program that I wront didn't work. The
> device was registered succesfully. I run mknod to create the device in
> /dev/. I wrote a program to open the device. When  run it in normal
> user mode, it throws error permission denied. When I run it in
> superuser mode, I get an error "Invalid device or address"(I don't
> remeber the exact sentence).
> 
> Please help me.
> 
> Deekshit M
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
>

Attachment: mymod.tar.bz2
Description: Binary data


[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