lkml.org 
[lkml]   [1999]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Old driver porting questions
I've just done a similar job. To get some info about the changes in the
API go to:

http://www.atnf.csiro.au/~rgooch/linux/docs/porting-to-2.2.html

Also get yourself a copy of the Linux Device Drivers by A. Rubini. It
doesn't have all the changes in the 2.2.x API, but it's still usable.

> * 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?

Replacing the names should work as per the copy_{to,from}_user(9) man
page and the definition of memcpy_{to,from}fs in Runini's book.

SYNOPSIS
#include <asm/uaccess.h>

err = get_user ( x, addr );
err = put_user ( x, addr );

bytes_left = copy_from_user(void*to, const void *from,
unsigned long n );
bytes_left = copy_to_user(void*to, const void *from,
unsigned long n );

> * struct file_operations has a new member flush. What's that?
>
> * struct file_operations has llseek, but the old driver has a method
> called lseek. Has lseek been changed to llseek with some semantic changes?

See info on this in the link above.

Only the second part of Alan Cox's articles is online. Can someone tell
me if there is an online copy of the first somewhere?

--
Rafael Herrera

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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.040 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site