Re: [patch -mm 11/20] chardev: GPIO for SCx200 & PC-8736x: migratefile-ops to common module

From: Andrew Morton
Date: Tue Jun 20 2006 - 01:23:23 EST


On Sat, 17 Jun 2006 12:32:36 -0600
Jim Cromie <jim.cromie@xxxxxxxxx> wrote:

> 11/20. patch.migrate-fops
>
> Now that the read(), write() file-ops are dispatching gpio-ops via the
> vtable, they are generic, and can be moved 'verbatim' to the nsc_gpio
> common-support module. After the move, various symbols are renamed to
> update 'scx200_' to 'nsc_', and headers are adjusted accordingly.
>
> Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
>
> --- ax-10/drivers/char/scx200_gpio.c 2006-06-17 01:23:47.000000000 -0600
> +++ ax-11/drivers/char/scx200_gpio.c 2006-06-17 01:33:50.000000000 -0600
> @@ -37,6 +37,12 @@ MODULE_PARM_DESC(major, "Major device nu
>
> extern void scx200_gpio_dump(unsigned index);
>
> +extern ssize_t nsc_gpio_write(struct file *file, const char __user *data,
> + size_t len, loff_t *ppos);
> +
> +extern ssize_t nsc_gpio_read(struct file *file, char __user *buf,
> + size_t len, loff_t *ppos);
> +

extern decls always always go into .h files.

> --- ax-10/include/linux/nsc_gpio.h 2006-06-17 01:20:34.000000000 -0600
> +++ ax-11/include/linux/nsc_gpio.h 2006-06-17 01:33:50.000000000 -0600
> @@ -31,3 +31,8 @@ struct nsc_gpio_ops {
> int (*gpio_current) (unsigned iminor);
> };
>
> +extern ssize_t nsc_gpio_write(struct file *file, const char __user *data,
> + size_t len, loff_t *ppos);
> +
> +extern ssize_t nsc_gpio_read(struct file *file, char __user *buf,
> + size_t len, loff_t *ppos);
>

Yeah, like that ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/