Re: Old driver porting questions

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 10 Nov 1999 21:22:27 +0000 (GMT)


>
> Now, this doesn't sound good. I don't have SMP here so SMP compliancy is
> not obligatory but I'd like to write it in the proper way. What should
> this become?
>
> save_flags(flags);
> cli();
> ...
> restore_flags(flags);

cli/sti is fine. The above is better

> * struct file_operations has llseek, but the old driver has a method
> called lseek. Has lseek been changed to llseek with some semantic changes?

Just size of value

> * request_irq now has additional parameters:
> unsigned long flags, const char *device, void *dev_id
> and free_irq requires the same dev_id. What are these? name is clear.
> Flags and dev_id are not. Is dev_ide just for the same driver to
> distinguish between several real devices? What to put in flags for normal
> ISA bus card?

You can pass NULL for a non sharable isa irq.

For the rest see http://www.linux-mag.com. It has two articles I wrote
on this stuff. Hopefully they help

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/