LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   request_region(...) return code (http://www.linuxquestions.org/questions/programming-9/request_region-return-code-422666/)

BrooklynOutlier 03-07-2006 09:22 PM

request_region(...) return code
 
I posted this to the Slackware distribution forum, but realize I should probably posted it here (I hope!).

I am running into problems using request_region(...). I am running Slackware 10.2 and gcc 3.3.6, and for all the world it looks like the code after the assignment to res is not working:
Code:

...
struct resource res;
...
res = request_region(kore_port, 3, "kore");
if (!res)
{
printk(KERN_ALERT "some message");
}
else
{
printk(KERN_ALERT "other message");
}
...

I don't see either message in the output, and I am seeing other KERN_ALERT messages before and after this. It is almost as if the prototype for the function doesn't match the actual function, and the return code is not on the stack ... I am a little rusty on C these days, so I can't really say that makes sense. Other than the messages, the code seems to be working, I can write to the port, etc.

I tried to find the source for the function underlying the macro request_region(...), but gave up after an hour (I am, indeed, a newbie). Any help would be appreciated.


All times are GMT -5. The time now is 08:16 AM.