Only in 2.6.11.8/ldd-examples: .htaccess Only in 2.6.25/ldd-examples/include: RCS diff -r 2.6.11.8/ldd-examples/lddbus/lddbus.c 2.6.25/ldd-examples/lddbus/lddbus.c 33,42c33,46 < static int ldd_hotplug(struct device *dev, char **envp, int num_envp, < char *buffer, int buffer_size) < { < envp[0] = buffer; < if (snprintf(buffer, buffer_size, "LDDBUS_VERSION=%s", < Version) >= buffer_size) < return -ENOMEM; < envp[1] = NULL; < return 0; < } --- > > /* > * It seems that struct bus_type has changed a lot. > * Gone: hotplug > * New: uevent, probe, remove, suspend_late, resume_early, shutdown > * I've only put in the uevent handler, since it is not clear to me > * what functionality an "ldd" device should provide for the others. > */ > > static int ldd_uevent(struct device *dev, struct kobj_uevent_env *env) { > if (add_uevent_var (env, "LDDVUS_VERSION=%s", Version)) > return -ENOMEM; > return 0; > }; 60c64 < --- > 73c77 < .hotplug = ldd_hotplug, --- > .uevent = ldd_uevent, diff -r 2.6.11.8/ldd-examples/lddbus/Makefile 2.6.25/ldd-examples/lddbus/Makefile 10c10,11 < CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) --- > > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) Only in 2.6.25/ldd-examples/lddbus: modules.order Only in 2.6.25/ldd-examples/lddbus: Module.symvers Only in 2.6.25/ldd-examples/lddbus: RCS diff -r 2.6.11.8/ldd-examples/Makefile 2.6.25/ldd-examples/Makefile 3c3 < skull scull scullc sculld scullp scullv sbull snull\ --- > skull scull scullc sculld scullp scullv sbull snull\ diff -r 2.6.11.8/ldd-examples/misc-modules/faulty.c 2.6.25/ldd-examples/misc-modules/faulty.c 18,19d17 < < #include diff -r 2.6.11.8/ldd-examples/misc-modules/hello.c 2.6.25/ldd-examples/misc-modules/hello.c 3a4,5 > > #include 5a8 > Only in 2.6.25/ldd-examples/misc-modules: hello.lst diff -r 2.6.11.8/ldd-examples/misc-modules/jiq.c 2.6.25/ldd-examples/misc-modules/jiq.c 17,18c17 < < #include --- > 40d38 < 55,59d52 < < static struct work_struct jiq_work; < < < 67a61 > struct delayed_work work; 72,73d65 < < 114c106 < static void jiq_print_wq(void *ptr) --- > static void jiq_print_wq(struct work_struct *ptr) 122c114 < schedule_delayed_work(&jiq_work, data->delay); --- > schedule_delayed_work(&jiq_data.work, data->delay); 124c116 < schedule_work(&jiq_work); --- > schedule_work(&jiq_data.work.work); 127,128d118 < < 140c130 < schedule_work(&jiq_work); --- > schedule_work(&jiq_data.work.work); 160c150 < schedule_delayed_work(&jiq_work, delay); --- > schedule_delayed_work(&jiq_data.work, delay); 244c234 < INIT_WORK(&jiq_work, jiq_print_wq, &jiq_data); --- > INIT_DELAYED_WORK(&jiq_data.work, jiq_print_wq); diff -r 2.6.11.8/ldd-examples/misc-modules/jit.c 2.6.25/ldd-examples/misc-modules/jit.c 18d17 < #include diff -r 2.6.11.8/ldd-examples/misc-modules/kdataalign.c 2.6.25/ldd-examples/misc-modules/kdataalign.c 17d16 < #include 51c50 < system_utsname.machine, --- > init_uts_ns.name.machine, diff -r 2.6.11.8/ldd-examples/misc-modules/kdatasize.c 2.6.25/ldd-examples/misc-modules/kdatasize.c 16a17 > /* 17a19 > */ 37c39 < system_utsname.machine, --- > init_uts_ns.name.machine, Only in 2.6.25/ldd-examples/misc-modules: lst Only in 2.6.25/ldd-examples/misc-modules: modules.order Only in 2.6.25/ldd-examples/misc-modules: Module.symvers Only in 2.6.25/ldd-examples/misc-modules: RCS Only in 2.6.25/ldd-examples/misc-progs: RCS Only in 2.6.25/ldd-examples/misc-progs: #setlevel# diff -r 2.6.11.8/ldd-examples/misc-progs/setlevel.c 2.6.25/ldd-examples/misc-progs/setlevel.c 24a25 > 26d26 < #define __LIBRARY__ /* _syscall3 and friends are only available through this */ 27a28 > #include 30d30 < _syscall3(int, syslog, int, type, char *, bufp, int, len); 41c41,43 < if (syslog(8,NULL,level) < 0) { --- > /* It seems _syscall3 is no longer supported, so > instead, we use the kosher klogctl() API. */ > if (klogctl(8,NULL,level) < 0) { Only in 2.6.25/ldd-examples/pci: modules.order Only in 2.6.25/ldd-examples/pci: Module.symvers diff -r 2.6.11.8/ldd-examples/pci/pci_skel.c 2.6.25/ldd-examples/pci/pci_skel.c 1d0 < #include 23a23 > int result; 27,28c27,29 < pci_enable_device(dev); < --- > if ((result = pci_enable_device(dev)) < 0) { > return result; > } 31,32d31 < < Only in 2.6.25/ldd-examples/pci: RCS Only in 2.6.25/ldd-examples: RCS diff -r 2.6.11.8/ldd-examples/sbull/Makefile 2.6.25/ldd-examples/sbull/Makefile 12,13c12 < CFLAGS += $(DEBFLAGS) < CFLAGS += -I.. --- > EXTRA_CFLAGS += $(DEBFLAGS) -I.. Only in 2.6.25/ldd-examples/sbull: modules.order Only in 2.6.25/ldd-examples/sbull: Module.symvers Only in 2.6.25/ldd-examples/sbull: RCS diff -r 2.6.11.8/ldd-examples/sbull/sbull.c 2.6.25/ldd-examples/sbull/sbull.c 5d4 < #include 104c103 < static void sbull_request(request_queue_t *q) --- > static void sbull_request(struct request_queue *q) 112c111 < end_request(req, 0); --- > blk_end_request(req, -EIO, req->current_nr_sectors << 9); 121c120 < end_request(req, 1); --- > blk_end_request(req, 1, req->current_nr_sectors << 9); 151c150,151 < struct bio *bio; --- > > struct req_iterator iter; 153,156c153,165 < < rq_for_each_bio(bio, req) { < sbull_xfer_bio(dev, bio); < nsect += bio->bi_size/KERNEL_SECTOR_SIZE; --- > struct bio_vec *bvec; > > /* Macro rq_for_each_bio is gone. > * In most cases one should use rq_for_each_segment. > */ > rq_for_each_segment(bvec, req, iter) { > char *buffer = __bio_kmap_atomic(iter.bio, iter.i, KM_USER0); > sector_t sector = iter.bio->bi_sector; > sbull_transfer(dev, sector, bio_cur_sectors(iter.bio), > buffer, bio_data_dir(iter.bio) == WRITE); > sector += bio_cur_sectors(iter.bio); > __bio_kunmap_atomic(iter.bio, KM_USER0); > nsect += iter.bio->bi_size/KERNEL_SECTOR_SIZE; 162d170 < 166c174 < static void sbull_full_request(request_queue_t *q) --- > static void sbull_full_request(struct request_queue *q) 179,182c187,188 < if (! end_that_request_first(req, 1, sectors_xferred)) { < blkdev_dequeue_request(req); < end_that_request_last(req); < } --- > __blk_end_request (req, 1, sectors_xferred << 9); > /* The above includes a call to add_disk_randomness(). */ 186,187d191 < < 191c195 < static int sbull_make_request(request_queue_t *q, struct bio *bio) --- > static int sbull_make_request(struct request_queue *q, struct bio *bio) 197c201 < bio_endio(bio, bio->bi_size, status); --- > bio_endio(bio, status); 444c448,449 < blk_put_queue(dev->queue); --- > kobject_put (&dev->queue->kobj); > /* blk_put_queue() is no longer an exported symbol */ diff -r 2.6.11.8/ldd-examples/scull/access.c 2.6.25/ldd-examples/scull/access.c 30a31 > #include diff -r 2.6.11.8/ldd-examples/scull/main.c 2.6.25/ldd-examples/scull/main.c 17d16 < #include diff -r 2.6.11.8/ldd-examples/scull/Makefile 2.6.25/ldd-examples/scull/Makefile 12,13c12 < CFLAGS += $(DEBFLAGS) < CFLAGS += -I$(LDDINC) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) 27a27 > echo $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules Only in 2.6.25/ldd-examples/scull: modules.order Only in 2.6.25/ldd-examples/scull: Module.symvers Only in 2.6.25/ldd-examples/scull: RCS diff -r 2.6.11.8/ldd-examples/scull/scull_load 2.6.25/ldd-examples/scull/scull_load 19c19 < major=$(awk "\\$2==\"$module\" {print \\$1}" /proc/devices) --- > major=$(awk "\$2==\"$module\" {print \$1}" /proc/devices) Only in 2.6.25/ldd-examples/scullc: #main.c# diff -r 2.6.11.8/ldd-examples/scullc/main.c 2.6.25/ldd-examples/scullc/main.c 18d17 < #include 33d31 < 52,56c50 < kmem_cache_t *scullc_cache; < < < < --- > struct kmem_cache *scullc_cache; 260a255 > 404c399 < struct work_struct work; --- > struct delayed_work work; 410c405 < static void scullc_do_deferred_op(void *p) --- > static void scullc_do_deferred_op(struct work_struct *work) 412c407 < struct async_work *stuff = (struct async_work *) p; --- > struct async_work *stuff = container_of(work, struct async_work, work.work); 418,419c413,414 < static int scullc_defer_op(int write, struct kiocb *iocb, char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullc_defer_op(int write, struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos) 422c417,418 < int result; --- > ssize_t result, len = 0; > int i; 424,428c420,430 < /* Copy now while we can access the buffer */ < if (write) < result = scullc_write(iocb->ki_filp, buf, count, &pos); < else < result = scullc_read(iocb->ki_filp, buf, count, &pos); --- > for (i = 0; i < nr_segs; i++) { > if (write) { > result = scullc_write (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } else { /* read */ > result = scullc_read (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } > if (result < 0) > return result; > len += result; > } > result = len; 440c442 < INIT_WORK(&stuff->work, scullc_do_deferred_op, stuff); --- > INIT_DELAYED_WORK(&stuff->work, scullc_do_deferred_op); 446,447c448,451 < static ssize_t scullc_aio_read(struct kiocb *iocb, char __user *buf, size_t count, < loff_t pos) --- > static ssize_t scullc_aio_read(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, > loff_t pos) 449c453 < return scullc_defer_op(0, iocb, buf, count, pos); --- > return scullc_defer_op(0, iocb, iovec, nr_segs, pos); 452,453c456,459 < static ssize_t scullc_aio_write(struct kiocb *iocb, const char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullc_aio_write(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, > loff_t pos) 455c461 < return scullc_defer_op(1, iocb, (char __user *) buf, count, pos); --- > return scullc_defer_op(1, iocb, iovec, nr_segs, pos); 457,460c463 < < < < --- > 511a515,516 > > 561c566 < 0, SLAB_HWCACHE_ALIGN, NULL, NULL); /* no ctor/dtor */ --- > 0, SLAB_HWCACHE_ALIGN, NULL); /* no ctor */ diff -r 2.6.11.8/ldd-examples/scullc/Makefile 2.6.25/ldd-examples/scullc/Makefile 12c12 < CFLAGS += $(DEBFLAGS) -I$(LDDINC) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) Only in 2.6.25/ldd-examples/scullc: modules.order Only in 2.6.25/ldd-examples/scullc: Module.symvers Only in 2.6.25/ldd-examples/scullc: RCS Only in 2.6.25/ldd-examples/sculld: #main.c# diff -r 2.6.11.8/ldd-examples/sculld/main.c 2.6.25/ldd-examples/sculld/main.c 18d17 < #include 412c411 < struct work_struct work; --- > struct delayed_work work; 418c417 < static void sculld_do_deferred_op(void *p) --- > static void sculld_do_deferred_op(struct work_struct *work) 420c419 < struct async_work *stuff = (struct async_work *) p; --- > struct async_work *stuff = container_of(work, struct async_work, work.work); 425,427c424,425 < < static int sculld_defer_op(int write, struct kiocb *iocb, char __user *buf, < size_t count, loff_t pos) --- > static ssize_t sculld_defer_op(int write, struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos) 430c428,429 < int result; --- > ssize_t result, len = 0; > int i; 432,436c431,441 < /* Copy now while we can access the buffer */ < if (write) < result = sculld_write(iocb->ki_filp, buf, count, &pos); < else < result = sculld_read(iocb->ki_filp, buf, count, &pos); --- > for (i = 0; i < nr_segs; i++) { > if (write) { > result = sculld_write (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } else { /* read */ > result = sculld_read (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } > if (result < 0) > return result; > len += result; > } > result = len; 448c453 < INIT_WORK(&stuff->work, sculld_do_deferred_op, stuff); --- > INIT_DELAYED_WORK(&stuff->work, sculld_do_deferred_op); 454c459,461 < static ssize_t sculld_aio_read(struct kiocb *iocb, char __user *buf, size_t count, --- > static ssize_t sculld_aio_read(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, 457c464 < return sculld_defer_op(0, iocb, buf, count, pos); --- > return sculld_defer_op(0, iocb, iovec, nr_segs, pos); 460,461c467,470 < 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 *iovec, > unsigned long nr_segs, > loff_t pos) 463c472 < return sculld_defer_op(1, iocb, (char __user *) buf, count, pos); --- > return sculld_defer_op(1, iocb, iovec, nr_segs, pos); 465,466d473 < < 535c542,544 < static ssize_t sculld_show_dev(struct device *ddev, char *buf) --- > static ssize_t sculld_show_dev(struct device *ddev, > struct device_attribute *attr, > char *buf) 536a546 > /* no longer a good example. should use attr parameter. */ 538d547 < 544c553 < static void sculld_register_dev(struct sculld_dev *dev, int index) --- > static int sculld_register_dev(struct sculld_dev *dev, int index) 545a555 > int result; 551c561,564 < device_create_file(&dev->ldev.dev, &dev_attr_dev); --- > if ((result = device_create_file(&dev->ldev.dev, &dev_attr_dev))) { > unregister_ldd_device(&dev->ldev); > return result; > } else return 0; 554d566 < 579,580c591,594 < register_ldd_driver(&sculld_driver); < --- > result = register_ldd_driver(&sculld_driver); > if (result) > goto fail_malloc; > 596,597c610,611 < sculld_register_dev(sculld_devices + i, i); < } --- > if (sculld_register_dev(sculld_devices + i, i)) > goto fail_register_dev; 598a613 > } 604a620,630 > /* Consider modifying sculld_cleanup() so that it can be called here, > to avoid the following duplicate code. */ > > fail_register_dev: > for (i-- ; i >= 0; i--) { > unregister_ldd_device(&sculld_devices[i].ldev); > cdev_del(&sculld_devices[i].cdev); > sculld_trim(sculld_devices + i); > } > kfree(sculld_devices); > unregister_ldd_driver(&sculld_driver); diff -r 2.6.11.8/ldd-examples/sculld/Makefile 2.6.25/ldd-examples/sculld/Makefile 12c12 < CFLAGS += $(DEBFLAGS) -I$(LDDINC) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) diff -r 2.6.11.8/ldd-examples/sculld/mmap.c 2.6.25/ldd-examples/sculld/mmap.c 18d17 < #include 22a22 > #include 95d94 < Only in 2.6.25/ldd-examples/sculld: modules.order Only in 2.6.25/ldd-examples/sculld: Module.symvers Only in 2.6.25/ldd-examples/sculld: RCS diff -r 2.6.11.8/ldd-examples/scullp/main.c 2.6.25/ldd-examples/scullp/main.c 18d17 < #include 403c402 < struct work_struct work; --- > struct delayed_work work; 409c408 < static void scullp_do_deferred_op(void *p) --- > static void scullp_do_deferred_op(struct work_struct *work) 411c410 < struct async_work *stuff = (struct async_work *) p; --- > struct async_work *stuff = container_of(work, struct async_work, work.work); 417,418c416,417 < static int scullp_defer_op(int write, struct kiocb *iocb, char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullp_defer_op(int write, struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos) 421c420,421 < int result; --- > ssize_t result, len = 0; > int i; 423,427c423,433 < /* Copy now while we can access the buffer */ < if (write) < result = scullp_write(iocb->ki_filp, buf, count, &pos); < else < result = scullp_read(iocb->ki_filp, buf, count, &pos); --- > for (i = 0; i < nr_segs; i++) { > if (write) { > result = scullp_write (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } else { /* read */ > result = scullp_read (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } > if (result < 0) > return result; > len += result; > } > result = len; 439c445 < INIT_WORK(&stuff->work, scullp_do_deferred_op, stuff); --- > INIT_DELAYED_WORK(&stuff->work, scullp_do_deferred_op); 444,446c450,453 < < static ssize_t scullp_aio_read(struct kiocb *iocb, char __user *buf, size_t count, < loff_t pos) --- > static ssize_t scullp_aio_read(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, > loff_t pos) 448c455 < return scullp_defer_op(0, iocb, buf, count, pos); --- > return scullp_defer_op(0, iocb, iovec, nr_segs, pos); 451,452c458,461 < static ssize_t scullp_aio_write(struct kiocb *iocb, const char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullp_aio_write(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, > loff_t pos) 454c463 < return scullp_defer_op(1, iocb, (char __user *) buf, count, pos); --- > return scullp_defer_op(1, iocb, iovec, nr_segs, pos); diff -r 2.6.11.8/ldd-examples/scullp/Makefile 2.6.25/ldd-examples/scullp/Makefile 12c12 < CFLAGS += $(DEBFLAGS) -I$(LDDINC) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) diff -r 2.6.11.8/ldd-examples/scullp/mmap.c 2.6.25/ldd-examples/scullp/mmap.c 18d17 < #include 22a22 > #include Only in 2.6.25/ldd-examples/scullp: modules.order Only in 2.6.25/ldd-examples/scullp: Module.symvers Only in 2.6.25/ldd-examples/scullp: RCS diff -r 2.6.11.8/ldd-examples/scullv/main.c 2.6.25/ldd-examples/scullv/main.c 18d17 < #include 52,56d50 < < < < < 59c53 < * The proc filesystem: function to read and entry --- > * The proc filesystem: function to read an entry 403c397 < struct work_struct work; --- > struct delayed_work work; 409c403 < static void scullv_do_deferred_op(void *p) --- > static void scullv_do_deferred_op(struct work_struct *work) 411c405 < struct async_work *stuff = (struct async_work *) p; --- > struct async_work *stuff = container_of(work, struct async_work, work.work); 417,418c411,412 < static int scullv_defer_op(int write, struct kiocb *iocb, char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullv_defer_op(int write, struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos) 421c415,416 < int result; --- > ssize_t result, len = 0; > int i; 423,427c418,428 < /* Copy now while we can access the buffer */ < if (write) < result = scullv_write(iocb->ki_filp, buf, count, &pos); < else < result = scullv_read(iocb->ki_filp, buf, count, &pos); --- > for (i = 0; i < nr_segs; i++) { > if (write) { > result = scullv_write (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } else { /* read */ > result = scullv_read (iocb->ki_filp, iov[i].iov_base, iov[i].iov_len, &pos); > } > if (result < 0) > return result; > len += result; > } > result = len; 439c440 < INIT_WORK(&stuff->work, scullv_do_deferred_op, stuff); --- > INIT_DELAYED_WORK(&stuff->work, scullv_do_deferred_op); 444,445c445,447 < < static ssize_t scullv_aio_read(struct kiocb *iocb, char __user *buf, size_t count, --- > static ssize_t scullv_aio_read(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, 448c450 < return scullv_defer_op(0, iocb, buf, count, pos); --- > return scullv_defer_op(0, iocb, iovec, nr_segs, pos); 451,452c453,456 < static ssize_t scullv_aio_write(struct kiocb *iocb, const char __user *buf, < size_t count, loff_t pos) --- > static ssize_t scullv_aio_write(struct kiocb *iocb, > const struct iovec *iovec, > unsigned long nr_segs, > loff_t pos) 454c458 < return scullv_defer_op(1, iocb, (char __user *) buf, count, pos); --- > return scullv_defer_op(1, iocb, iovec, nr_segs, pos); diff -r 2.6.11.8/ldd-examples/scullv/Makefile 2.6.25/ldd-examples/scullv/Makefile 12c12 < CFLAGS += $(DEBFLAGS) -I$(LDDINC) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) diff -r 2.6.11.8/ldd-examples/scullv/mmap.c 2.6.25/ldd-examples/scullv/mmap.c 18c18 < #include --- > /* #include */ 22a23 > #include Only in 2.6.25/ldd-examples/scullv: #mmap.h# Only in 2.6.25/ldd-examples/scullv: modules.order Only in 2.6.25/ldd-examples/scullv: Module.symvers Only in 2.6.25/ldd-examples/scullv: RCS diff -r 2.6.11.8/ldd-examples/short/Makefile 2.6.25/ldd-examples/short/Makefile 12,13c12,13 < CFLAGS += $(DEBFLAGS) < CFLAGS += -I.. --- > EXTRA_CFLAGS += $(DEBFLAGS) > EXTRA_CFLAGS += -I.. Only in 2.6.25/ldd-examples/short: modules.order Only in 2.6.25/ldd-examples/short: Module.symvers Only in 2.6.25/ldd-examples/short: RCS diff -r 2.6.11.8/ldd-examples/short/short.c 2.6.25/ldd-examples/short/short.c 24d23 < #include 336c335 < irqreturn_t short_interrupt(int irq, void *dev_id, struct pt_regs *regs) --- > irqreturn_t short_interrupt(int irq, void *dev_id) 380,381d378 < < 412,413c409 < < irqreturn_t short_wq_interrupt(int irq, void *dev_id, struct pt_regs *regs) --- > irqreturn_t short_wq_interrupt(int irq, void *dev_id) 425a422,425 > void short_do_work(struct work_struct *work) > { > short_do_tasklet(0); > } 431c431 < irqreturn_t short_tl_interrupt(int irq, void *dev_id, struct pt_regs *regs) --- > irqreturn_t short_tl_interrupt(int irq, void *dev_id) 440,443c440 < < < < irqreturn_t short_sh_interrupt(int irq, void *dev_id, struct pt_regs *regs) --- > irqreturn_t short_sh_interrupt(int irq, void *dev_id) 494c491 < irqreturn_t short_probing(int irq, void *dev_id, struct pt_regs *regs) --- > irqreturn_t short_probing(int irq, void *dev_id) 514,515c511 < SA_INTERRUPT, "short probe", NULL); < --- > IRQ_DISABLED, "short probe", NULL); 597c593 < INIT_WORK(&short_wq, (void (*)(void *)) short_do_tasklet, NULL); --- > INIT_WORK(&short_wq, short_do_work); 624c620 < SA_SHIRQ | SA_INTERRUPT,"short", --- > IRQF_SHARED | IRQF_DISABLED,"short", 638c634 < SA_INTERRUPT, "short", NULL); --- > IRQF_DISABLED, "short", NULL); 658c654 < SA_INTERRUPT,"short-bh", NULL); --- > IRQF_DISABLED, "short-bh", NULL); diff -r 2.6.11.8/ldd-examples/shortprint/Makefile 2.6.25/ldd-examples/shortprint/Makefile 4c4 < CFLAGS += -O2 -I.. --- > EXTRA_CFLAGS += -O2 -I.. Only in 2.6.25/ldd-examples/shortprint: modules.order Only in 2.6.25/ldd-examples/shortprint: Module.symvers Only in 2.6.25/ldd-examples/shortprint: RCS diff -r 2.6.11.8/ldd-examples/shortprint/shortprint.c 2.6.25/ldd-examples/shortprint/shortprint.c 18d17 < #include 111,112c110,111 < static void shortp_do_work(void *); < static DECLARE_WORK(shortp_work, shortp_do_work, NULL); --- > static void shortp_do_work(struct work_struct *work); > static DECLARE_WORK(shortp_work, shortp_do_work); 325c324 < static void shortp_do_work(void *unused) --- > static void shortp_do_work(struct work_struct *work) 363c362 < static irqreturn_t shortp_interrupt(int irq, void *dev_id, struct pt_regs *regs) --- > static irqreturn_t shortp_interrupt(int irq, void *dev_id) 399c398 < shortp_interrupt(shortp_irq, NULL, NULL); --- > shortp_interrupt(shortp_irq, NULL); diff -r 2.6.11.8/ldd-examples/simple/Makefile 2.6.25/ldd-examples/simple/Makefile 11c11 < CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) --- > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) Only in 2.6.25/ldd-examples/simple: modules.order Only in 2.6.25/ldd-examples/simple: Module.symvers Only in 2.6.25/ldd-examples/simple: RCS diff -r 2.6.11.8/ldd-examples/simple/simple.c 2.6.25/ldd-examples/simple/simple.c 18d17 < #include Only in 2.6.25/ldd-examples/skull: RCS diff -r 2.6.11.8/ldd-examples/snull/Makefile 2.6.25/ldd-examples/snull/Makefile 12,13c12 < CFLAGS += $(DEBFLAGS) < CFLAGS += -I.. --- > EXTRA_CFLAGS += $(DEBFLAGS) -I.. 25a25 > echo KERNELDIR = $(KERNELDIR) Only in 2.6.25/ldd-examples/snull: modules.order Only in 2.6.25/ldd-examples/snull: Module.symvers Only in 2.6.25/ldd-examples/snull: RCS diff -r 2.6.11.8/ldd-examples/snull/snull.c 2.6.25/ldd-examples/snull/snull.c 18c18,27 < #include --- > /* I have made an attempt to bring this code up to kernel 2.6.25, > * but am not certain it works, and am less convinced it is still > * a good example of how to write a network device driver. > * It seems that circa kernel 2.6.24 the NAPI interfaces were > * changed. Responsibility for managing the quote was move > * from individual drivers' poll functions to shared code. > * There also seems to be some new NAPI registration stuff. > * See http://lwn.net/Articles/244640/ for more info. > */ > 89a99,103 > struct net_device *dev; > struct napi_struct napi; > /* Consider creating new struct for snull device, and putting > * the struct net_dev in here. > */ 287c301 < static int snull_poll(struct net_device *dev, int *budget) --- > static int snull_poll(struct napi_struct *napi, int budget) 289c303 < int npackets = 0, quota = min(dev->quota, *budget); --- > int npackets = 0; 291c305,306 < struct snull_priv *priv = netdev_priv(dev); --- > struct snull_priv *priv = container_of(napi, struct snull_priv, napi); > struct net_device *dev = priv->dev; 294c309 < while (npackets < quota && priv->rx_queue) { --- > while (npackets < budget && priv->rx_queue) { 310d324 < 318,321c332,333 < *budget -= npackets; < dev->quota -= npackets; < if (! priv->rx_queue) { < netif_rx_complete(dev); --- > if (npackets < budget) { > netif_rx_complete(dev, napi); 323d334 < return 0; 325,326c336 < /* We couldn't process everything. */ < return 1; --- > return npackets; 329c339 < --- > 406c416 < netif_rx_schedule(dev); --- > netif_rx_schedule(dev, &(priv->napi)); 588c598 < unsigned short type, void *daddr, void *saddr, --- > unsigned short type, const void *daddr, const void *saddr, 625a636,641 > static const struct header_ops snull_header_ops = { > .create = snull_header, > .rebuild = snull_rebuild_header, > .cache = NULL, /* disable caching */ > }; > 654,655c670 < dev->rebuild_header = snull_rebuild_header; < dev->hard_header = snull_header; --- > dev->header_ops = &snull_header_ops; 658,661d672 < if (use_napi) { < dev->poll = snull_poll; < dev->weight = 2; < } 665,666d675 < dev->hard_header_cache = NULL; /* Disable caching */ < 672a682,684 > priv->dev = dev; > netif_napi_add(dev, &priv->napi, snull_poll, 2); > /* The last parameter above is the NAPI "weight". */ diff -r 2.6.11.8/ldd-examples/tty/Makefile 2.6.25/ldd-examples/tty/Makefile 12,13c12 < CFLAGS += $(DEBFLAGS) < CFLAGS += -I.. --- > EXTRA_CFLAGS += $(DEBFLAGS) -I.. Only in 2.6.25/ldd-examples/tty: modules.order Only in 2.6.25/ldd-examples/tty: Module.symvers Only in 2.6.25/ldd-examples/tty: RCS diff -r 2.6.11.8/ldd-examples/tty/tiny_serial.c 2.6.25/ldd-examples/tty/tiny_serial.c 47c47 < static void tiny_stop_tx(struct uart_port *port, unsigned int tty_stop) --- > static void tiny_stop_tx(struct uart_port *port) 71c71 < tiny_stop_tx(port, 0); --- > tiny_stop_tx(port); 88c88 < tiny_stop_tx(port, 0); --- > tiny_stop_tx(port); 91c91 < static void tiny_start_tx(struct uart_port *port, unsigned int tty_start) --- > static void tiny_start_tx(struct uart_port *port) 143c143 < struct termios *new, struct termios *old) --- > struct ktermios *new, struct ktermios *old) diff -r 2.6.11.8/ldd-examples/tty/tiny_tty.c 2.6.25/ldd-examples/tty/tiny_tty.c 15d14 < #include 25a25 > #include 67d66 < int i; 78,83c77,79 < for (i = 0; i < data_size; ++i) { < if (tty->flip.count >= TTY_FLIPBUF_SIZE) < tty_flip_buffer_push(tty); < tty_insert_flip_char(tty, data[i], TTY_NORMAL); < } < tty_flip_buffer_push(tty); --- > tty_buffer_request_room (tty, data_size); > tty_insert_flip_string(tty, data, data_size); > tty_flip_buffer_push(tty); 228c224 < static void tiny_set_termios(struct tty_struct *tty, struct termios *old_termios) --- > static void tiny_set_termios(struct tty_struct *tty, struct ktermios *old_termios) 532c528 < tiny_tty_driver->devfs_name = "tts/ttty%d"; --- > /* no more devfs subsystem */ 536c532,533 < tiny_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS, --- > tiny_tty_driver->flags = TTY_DRIVER_REAL_RAW, > /* no more devfs subsystem */ Only in 2.6.25/ldd-examples/usb: modules.order Only in 2.6.25/ldd-examples/usb: Module.symvers Only in 2.6.25/ldd-examples/usb: RCS diff -r 2.6.11.8/ldd-examples/usb/usb-skeleton.c 2.6.25/ldd-examples/usb/usb-skeleton.c 16d15 < #include 115a115 > int actual_size; 124c124,125 < &count, HZ*10); --- > &actual_size, > HZ*10); 128c129 < if (copy_to_user(buffer, dev->bulk_in_buffer, count)) --- > if (copy_to_user(buffer, dev->bulk_in_buffer, actual_size)) 137c138 < static void skel_write_bulk_callback(struct urb *urb, struct pt_regs *regs) --- > static void skel_write_bulk_callback(struct urb *urb) 224d224 < .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, 328d327 < .owner = THIS_MODULE,