On 02 Oct 2009, at 11:44 AM, Harinderjit Singh Sandhu wrote:

nw i got the follwing result when i inserted this module:
----------------------------------------------------------------------
Oct 2 14:46:47 AnkurAggarwal kernel: Ank$: Hello module registered successfully! Oct 2 14:46:47 AnkurAggarwal kernel: Ank$: Memory allocation successful
Oct  2 14:46:47 AnkurAggarwal kernel: Ank$: Port Available
Oct  2 14:46:47 AnkurAggarwal kernel: Ank$:cdev successful
Oct 2 14:46:47 AnkurAggarwal kernel: Ank$: Generation of Interrupt starts
Oct  2 14:46:47 AnkurAggarwal kernel: Anks:ret:-16
Oct  2 14:46:47 AnkurAggarwal kernel: Press a key...
Oct  2 14:46:47 AnkurAggarwal kernel: >>> PARALLEL PORT INT HANDLED
Oct  2 14:46:47 AnkurAggarwal kernel: Ank$: ret=-16
Oct 2 14:46:47 AnkurAggarwal kernel: Generating interrupt now on all output pins (intr/ACK = pin 10) Oct 2 14:46:47 AnkurAggarwal kernel: Interrupt generated. You should see the handler-message
-----------------------------------------------------------------------------------------------------------------------
the return value for request_irq() is negative but still it shows the handler message. what could be the problem ???

Did you remember free_irq in the module exit code? Its possible the second time you load the module it cannot acquire the interrupt because it was never released the first time (just guessing here). If thats the case, you must add free_irq and you may have to reboot.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to