Re: Old driver porting questions

Tuukka Toivonen (tuukkat@ees2.oulu.fi)
Sat, 13 Nov 1999 04:58:35 +0200 (EET)


On Wed, 10 Nov 1999, Meelis Roos wrote:

>I'm porting an old handheld scanner driver (Mustek scanners with GI1904

Uh -- me too. (gs105 driver)

See http://www.atnf.csiro.au/~rgooch/linux/docs/index.html,
it has couple of articles about porting.

>* how to convert memcpy_tofs and memcpy_fromfs to copy_{to,from}_user?
>Should I just change the function names in function calls or is there
>something else to consider?

You don't need verify_area (or whatever was used) call. The functions
return a value whether they succeeded or not. Just check that you put the
arguments in right order (don't blindly change the function names).

>* struct file_operations has a new member flush. What's that?

You shoudln't need that. Just use NULL.

>* request_irq now has additional parameters:
>unsigned long flags, const char *device, void *dev_id

Just use NULL for dev_id.

You may want to look gs105, which I ported to 2.0 and then 2.2.
I don't know much myself either, so don't believe the source
without thinking. At http://www.ee.oulu.fi/~tuukkat/releases.html.

--
| Tuukka Toivonen <tuukkat@ee.oulu.fi>       [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/       available]
| Try also finger -l tuukkat@ee.oulu.fi
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------

- 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/