Index: tty/tiny_tty.c =================================================================== --- tty/tiny_tty.c (revision 4) +++ tty/tiny_tty.c (working copy) @@ -12,7 +12,7 @@ * from some kind of hardware. */ -#include +//#include #include #include #include Index: tty/Makefile =================================================================== --- tty/Makefile (revision 4) +++ tty/Makefile (working copy) @@ -9,8 +9,8 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -CFLAGS += -I.. +EXTRA_CFLAGS += $(DEBFLAGS) +EXTRA_CFLAGS += -I.. ifneq ($(KERNELRELEASE),) # call from kernel build system Index: sbull/sbull.c =================================================================== --- sbull/sbull.c (revision 4) +++ sbull/sbull.c (working copy) @@ -2,7 +2,7 @@ * Sample disk driver, from the beginning. */ -#include +//#include #include #include #include @@ -101,11 +101,11 @@ /* * The simple form of the request function. */ -static void sbull_request(request_queue_t *q) +static void sbull_request(struct request_queue *q) { struct request *req; - while ((req = elv_next_request(q)) != NULL) { + while ((req = blk_peek_request(q)) != NULL) { struct sbull_dev *dev = req->rq_disk->private_data; if (! blk_fs_request(req)) { printk (KERN_NOTICE "Skip non-fs request\n"); @@ -163,7 +163,7 @@ /* * Smarter request function that "handles clustering". */ -static void sbull_full_request(request_queue_t *q) +static void sbull_full_request(struct request_queue *q) { struct request *req; int sectors_xferred; @@ -188,13 +188,13 @@ /* * The direct make request version. */ -static int sbull_make_request(request_queue_t *q, struct bio *bio) +static int sbull_make_request(struct request_queue *q, struct bio *bio) { struct sbull_dev *dev = q->queuedata; int status; status = sbull_xfer_bio(dev, bio); - bio_endio(bio, bio->bi_size, status); + bio_endio(bio, status); return 0; } Index: sbull/Makefile =================================================================== --- sbull/Makefile (revision 4) +++ sbull/Makefile (working copy) @@ -9,8 +9,8 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -CFLAGS += -I.. +EXTRA_CFLAGS += $(DEBFLAGS) +EXTRA_CFLAGS += -I.. ifneq ($(KERNELRELEASE),) # call from kernel build system Index: scull/pipe.c =================================================================== --- scull/pipe.c (revision 4) +++ scull/pipe.c (working copy) @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "scull.h" /* local definitions */ Index: misc-progs/setlevel.c =================================================================== --- misc-progs/setlevel.c (revision 4) +++ misc-progs/setlevel.c (working copy) @@ -27,7 +27,7 @@ #include /* define the system call, to override the library function */ -_syscall3(int, syslog, int, type, char *, bufp, int, len); +//_syscall3(int, syslog, int, type, char *, bufp, int, len); int main(int argc, char **argv) { Index: misc-progs/inp.c =================================================================== --- misc-progs/inp.c (revision 4) +++ misc-progs/inp.c (working copy) @@ -30,7 +30,7 @@ #include #include -#include /* linux-specific */ +//#include /* linux-specific */ #ifdef __GLIBC__ # include Index: misc-progs/outp.c =================================================================== --- misc-progs/outp.c (revision 4) +++ misc-progs/outp.c (working copy) @@ -30,7 +30,7 @@ #include #include -#include /* linux-specific */ +//#include /* linux-specific */ #ifdef __GLIBC__ # include Index: misc-progs/Makefile =================================================================== --- misc-progs/Makefile (revision 4) +++ misc-progs/Makefile (working copy) @@ -4,7 +4,7 @@ KERNELDIR ?= /lib/modules/$(shell uname -r)/build INCLUDEDIR = $(KERNELDIR)/include -CFLAGS = -O2 -fomit-frame-pointer -Wall -I$(INCLUDEDIR) +EXTRA_CFLAGS = -O2 -fomit-frame-pointer -Wall -I$(INCLUDEDIR) all: $(FILES) Index: scullc/main.c =================================================================== --- scullc/main.c (revision 4) +++ scullc/main.c (working copy) @@ -15,7 +15,13 @@ * $Id: _main.c.in,v 1.21 2004/10/14 20:11:39 corbet Exp $ */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include #include @@ -49,7 +55,7 @@ void scullc_cleanup(void); /* declare one cache pointer: use it for all devices */ -kmem_cache_t *scullc_cache; +struct kmem_cache *scullc_cache; @@ -401,7 +407,7 @@ struct async_work { struct kiocb *iocb; int result; - struct work_struct work; + struct delayed_work work; }; /* @@ -437,7 +443,7 @@ return result; /* No memory, just complete now */ stuff->iocb = iocb; stuff->result = result; - INIT_WORK(&stuff->work, scullc_do_deferred_op, stuff); + INIT_DELAYED_WORK(&stuff->work, scullc_do_deferred_op); //, stuff); schedule_delayed_work(&stuff->work, HZ/100); return -EIOCBQUEUED; } @@ -558,7 +564,7 @@ } scullc_cache = kmem_cache_create("scullc", scullc_quantum, - 0, SLAB_HWCACHE_ALIGN, NULL, NULL); /* no ctor/dtor */ + 0, SLAB_HWCACHE_ALIGN, NULL); /* no ctor/dtor */ if (!scullc_cache) { scullc_cleanup(); return -ENOMEM; Index: scullc/mmap.c =================================================================== --- scullc/mmap.c (revision 4) +++ scullc/mmap.c (working copy) @@ -15,7 +15,7 @@ * $Id: _mmap.c.in,v 1.13 2004/10/18 18:07:36 corbet Exp $ */ -#include +//#include #include #include /* everything */ Index: scullc/Makefile =================================================================== --- scullc/Makefile (revision 4) +++ scullc/Makefile (working copy) @@ -9,7 +9,7 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -I$(LDDINC) +EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) TARGET = scullc Index: sculld/main.c =================================================================== --- sculld/main.c (revision 4) +++ sculld/main.c (working copy) @@ -15,7 +15,7 @@ * $Id: _main.c.in,v 1.21 2004/10/14 20:11:39 corbet Exp $ */ -#include +//#include #include #include #include @@ -27,6 +27,8 @@ #include #include /* O_ACCMODE */ #include +#include + #include #include "sculld.h" /* local definitions */ @@ -409,7 +411,7 @@ struct async_work { struct kiocb *iocb; int result; - struct work_struct work; + struct delayed_work work; }; /* @@ -423,7 +425,7 @@ } -static int sculld_defer_op(int write, struct kiocb *iocb, char __user *buf, +static int sculld_defer_op(int write, struct kiocb *iocb, const struct iovec *iov, size_t count, loff_t pos) { struct async_work *stuff; @@ -445,22 +447,21 @@ return result; /* No memory, just complete now */ stuff->iocb = iocb; stuff->result = result; - INIT_WORK(&stuff->work, sculld_do_deferred_op, stuff); + INIT_DELAYED_WORK(&stuff->work, sculld_do_deferred_op); //, stuff); schedule_delayed_work(&stuff->work, HZ/100); return -EIOCBQUEUED; } - -static ssize_t sculld_aio_read(struct kiocb *iocb, char __user *buf, size_t count, - loff_t pos) +static ssize_t sculld_aio_read(struct kiocb *iocb, const struct iovec *iov, + unsigned long nr_segs, loff_t pos) { - return sculld_defer_op(0, iocb, buf, count, pos); + return sculld_defer_op(0, iocb, iov, count, pos); } -static ssize_t sculld_aio_write(struct kiocb *iocb, const char __user *buf, - size_t count, loff_t pos) +static ssize_t sculld_aio_write(struct kiocb *iocb, const struct iovec *iov, + unsigned long nr_segs, loff_t pos) { - return sculld_defer_op(1, iocb, (char __user *) buf, count, pos); + return sculld_defer_op(1, iocb, iov, count, pos); } @@ -473,6 +474,10 @@ /* * The fops +1540 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); +1541 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); +1542 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); +1543 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); */ struct file_operations sculld_fops = { @@ -534,7 +539,7 @@ static ssize_t sculld_show_dev(struct device *ddev, char *buf) { - struct sculld_dev *dev = ddev->driver_data; + struct sculld_dev *dev = ddev->device_private; return print_dev_t(buf, dev->cdev.dev); } Index: sculld/mmap.c =================================================================== --- sculld/mmap.c (revision 4) +++ sculld/mmap.c (working copy) @@ -15,7 +15,7 @@ * $Id: _mmap.c.in,v 1.13 2004/10/18 18:07:36 corbet Exp $ */ -#include +//#include #include #include /* everything */ Index: sculld/Makefile =================================================================== --- sculld/Makefile (revision 4) +++ sculld/Makefile (working copy) @@ -9,7 +9,7 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -I$(LDDINC) +EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) TARGET = sculld Index: usb/usb-skeleton.c =================================================================== --- usb/usb-skeleton.c (revision 4) +++ usb/usb-skeleton.c (working copy) @@ -13,7 +13,7 @@ * */ -#include +//#include #include #include #include Index: simple/simple.c =================================================================== --- simple/simple.c (revision 4) +++ simple/simple.c (working copy) @@ -15,7 +15,7 @@ * $Id: simple.c,v 1.12 2005/01/31 16:15:31 rubini Exp $ */ -#include +//#include #include #include #include Index: simple/Makefile =================================================================== --- simple/Makefile (revision 4) +++ simple/Makefile (working copy) @@ -8,7 +8,7 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) +EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) ifneq ($(KERNELRELEASE),) # call from kernel build system Index: skull/skull_clean.c =================================================================== --- skull/skull_clean.c (revision 4) +++ skull/skull_clean.c (working copy) @@ -1,4 +1,4 @@ -#include +//#include #include #include Index: skull/skull_init.c =================================================================== --- skull/skull_init.c (revision 4) +++ skull/skull_init.c (working copy) @@ -20,7 +20,7 @@ /* jc: cleaned up, but not yet run for anything */ -#include +//#include #include #include #include Index: snull/Makefile =================================================================== --- snull/Makefile (revision 4) +++ snull/Makefile (working copy) @@ -9,8 +9,8 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -CFLAGS += -I.. +EXTRA_CFLAGS += $(DEBFLAGS) +EXTRA_CFLAGS += -I.. ifneq ($(KERNELRELEASE),) # call from kernel build system Index: snull/snull.c =================================================================== --- snull/snull.c (revision 4) +++ snull/snull.c (working copy) @@ -15,7 +15,13 @@ * $Id: snull.c,v 1.21 2004/11/05 02:36:03 rubini Exp $ */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include #include Index: short/short.c =================================================================== --- short/short.c (revision 4) +++ short/short.c (working copy) @@ -21,7 +21,7 @@ * writers. */ -#include +//#include #include #include #include Index: short/Makefile =================================================================== --- short/Makefile (revision 4) +++ short/Makefile (working copy) @@ -9,8 +9,8 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -CFLAGS += -I.. +EXTRA_CFLAGS += $(DEBFLAGS) +EXTRA_CFLAGS += -I.. ifneq ($(KERNELRELEASE),) # call from kernel build system Index: misc-modules/kdatasize.c =================================================================== --- misc-modules/kdatasize.c (revision 4) +++ misc-modules/kdatasize.c (working copy) @@ -14,7 +14,13 @@ * we cannot take responsibility for errors or fitness for use. */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include @@ -34,7 +40,7 @@ " u8 u16 u32 u64\n"); printk("%-12s %3i %3i %3i %3i %3i %3i " "%3i %3i %3i %3i\n", - system_utsname.machine, + utsname()->machine, (int)sizeof(char), (int)sizeof(short), (int)sizeof(int), (int)sizeof(long), (int)sizeof(void *), (int)sizeof(long long), (int)sizeof(__u8), Index: misc-modules/kdataalign.c =================================================================== --- misc-modules/kdataalign.c (revision 4) +++ misc-modules/kdataalign.c (working copy) @@ -14,7 +14,13 @@ * we cannot take responsibility for errors or fitness for use. */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include #include @@ -48,7 +54,7 @@ " u8 u16 u32 u64\n"); printk("%-12s %3i %3i %3i %3i %3i %3i " "%3i %3i %3i %3i\n", - system_utsname.machine, + utsname()->machine, /* note that gcc can subtract void * values, but it's not ansi */ (int)((void *)(&c.t) - (void *)&c), (int)((void *)(&s.t) - (void *)&s), Index: misc-modules/jiq.c =================================================================== --- misc-modules/jiq.c (revision 4) +++ misc-modules/jiq.c (working copy) @@ -15,7 +15,13 @@ * $Id: jiq.c,v 1.7 2004/09/26 07:02:43 gregkh Exp $ */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include #include @@ -54,9 +60,9 @@ static struct work_struct jiq_work; +static struct delayed_work jiq_delayed_work; - /* * Keep track of info we need between task queue runs. */ @@ -119,7 +125,7 @@ return; if (data->delay) - schedule_delayed_work(&jiq_work, data->delay); + schedule_delayed_work(&jiq_delayed_work, data->delay); else schedule_work(&jiq_work); } @@ -241,7 +247,8 @@ { /* this line is in jiq_init() */ - INIT_WORK(&jiq_work, jiq_print_wq, &jiq_data); + INIT_WORK(&jiq_work, jiq_print_wq); //, &jiq_data); + INIT_DELAYED_WORK(&jiq_delayed_work, jiq_print_wq); //, &jiq_data); create_proc_read_entry("jiqwq", 0, NULL, jiq_read_wq, NULL); create_proc_read_entry("jiqwqdelay", 0, NULL, jiq_read_wq_delayed, NULL); Index: misc-modules/faulty.c =================================================================== --- misc-modules/faulty.c (revision 4) +++ misc-modules/faulty.c (working copy) @@ -16,7 +16,13 @@ */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #include +#else +#include +#endif +//#include #include #include Index: misc-modules/jit.c =================================================================== --- misc-modules/jit.c (revision 4) +++ misc-modules/jit.c (working copy) @@ -15,7 +15,7 @@ * $Id: jit.c,v 1.16 2004/09/26 07:02:43 gregkh Exp $ */ -#include +//#include // killed in 2.6.19 #include #include #include @@ -28,6 +28,8 @@ #include #include +#include + #include /* * This module is a silly one: it only embeds short code fragments Index: scullp/main.c =================================================================== --- scullp/main.c (revision 4) +++ scullp/main.c (working copy) @@ -15,7 +15,7 @@ * $Id: _main.c.in,v 1.21 2004/10/14 20:11:39 corbet Exp $ */ -#include +//#include #include #include #include @@ -400,7 +400,7 @@ struct async_work { struct kiocb *iocb; int result; - struct work_struct work; + struct delayed_work work; }; /* @@ -410,6 +410,7 @@ { struct async_work *stuff = (struct async_work *) p; aio_complete(stuff->iocb, stuff->result, 0); + //aio_complete(struct kiocb *iocb, long res, long res2); kfree(stuff); } @@ -436,7 +437,7 @@ return result; /* No memory, just complete now */ stuff->iocb = iocb; stuff->result = result; - INIT_WORK(&stuff->work, scullp_do_deferred_op, stuff); + INIT_WORK(&stuff->work, scullp_do_deferred_op); //, stuff); schedule_delayed_work(&stuff->work, HZ/100); return -EIOCBQUEUED; } Index: scullp/mmap.c =================================================================== --- scullp/mmap.c (revision 4) +++ scullp/mmap.c (working copy) @@ -15,7 +15,7 @@ * $Id: _mmap.c.in,v 1.13 2004/10/18 18:07:36 corbet Exp $ */ -#include +//#include #include #include /* everything */ Index: scullp/Makefile =================================================================== --- scullp/Makefile (revision 4) +++ scullp/Makefile (working copy) @@ -9,7 +9,7 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -I$(LDDINC) +EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) TARGET = scullp Index: scullv/main.c =================================================================== --- scullv/main.c (revision 4) +++ scullv/main.c (working copy) @@ -15,7 +15,7 @@ * $Id: _main.c.in,v 1.21 2004/10/14 20:11:39 corbet Exp $ */ -#include +//#include #include #include #include Index: scullv/mmap.c =================================================================== --- scullv/mmap.c (revision 4) +++ scullv/mmap.c (working copy) @@ -15,7 +15,7 @@ * $Id: _mmap.c.in,v 1.13 2004/10/18 18:07:36 corbet Exp $ */ -#include +//#include #include #include /* everything */ Index: scullv/Makefile =================================================================== --- scullv/Makefile (revision 4) +++ scullv/Makefile (working copy) @@ -9,7 +9,7 @@ DEBFLAGS = -O2 endif -CFLAGS += $(DEBFLAGS) -I$(LDDINC) +EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) TARGET = scullv Index: pci/pci_skel.c =================================================================== --- pci/pci_skel.c (revision 4) +++ pci/pci_skel.c (working copy) @@ -1,4 +1,4 @@ -#include +//#include #include #include #include Index: shortprint/shortprint.c =================================================================== --- shortprint/shortprint.c (revision 4) +++ shortprint/shortprint.c (working copy) @@ -15,7 +15,7 @@ * * $Id: shortprint.c,v 1.4 2004/09/26 08:01:04 gregkh Exp $ */ -#include +//#include #include #include Index: shortprint/Makefile =================================================================== --- shortprint/Makefile (revision 4) +++ shortprint/Makefile (working copy) @@ -1,7 +1,7 @@ # Comment/uncomment the following line to disable/enable debugging #DEBUG = y -CFLAGS += -O2 -I.. +EXTRA_CFLAGS += -O2 -I.. ifneq ($(KERNELRELEASE),) # call from kernel build system