Vishal Linux a écrit :
On 5/30/05, *Tyler* <tyler@xxxxxxxx <mailto:tyler@xxxxxxxx>> wrote:
Vishal Linux a écrit :
> Hi all,
>
Hi
> I am trying to associate a driver to the '/dev/mem' device (the major
> no. and minor no. of device is 1,1.)
>
> [vishal@vishalsoni ~]$ ll /dev/mem
> crw-r----- 1 root kmem 1, 1 May 30 2005 /dev/mem
>
Don't use 1 as major number. It's probably used by another driver (null
driver on my computer).
Try to allocate dynamically a major number or get one that is not used.
This is actually, what i don't intend to do... i want to associate my
driver to /dev/mem device.. so that any read/write/mmap done to this
device.. give control to my driver.
I think that's the problem. So when you open the /dev/mem device, in
fact it doesn't use "your open" method but another.
Yeah , it should give an error then, which i am not getting..
as my device registration is successful.
Oh ok I didn"t notice the /dev/mem has already a driver.
So you have first do unregister the driver for this device and then you
can add the new one.
But it's not a good idea to do this.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/