LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   request_region return code (https://www.linuxquestions.org/questions/slackware-14/request_region-return-code-422341/)

BrooklynOutlier 03-06-2006 10:26 PM

request_region return code
 
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:

...
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 12:11 AM.