The following patch fixes some kdev_t compilation problems
in linux-2.5.2-pre7/drivers/block/xd.c.
I have not gotten pre7 to build, so this is untested. On
the other hand, as Linus mentioned the last time I posted a patch
to this file, there may not be any Linux users running XT
hard disks. So, whether this patch works or not may not matter. :-)
-- Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."--pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xd.diff"
--- linux-2.5.2-pre7/drivers/block/xd.c Thu Jan 3 19:52:01 2002 +++ linux/drivers/block/xd.c Fri Jan 4 00:39:48 2002 @@ -249,7 +249,8 @@ for (i = 0; i < xd_drives; i++) { xd_valid[i] = 1; - register_disk(&xd_gendisk, MKDEV(MAJOR_NR,i<<6), 1<<6, &xd_fops, + register_disk(&xd_gendisk, mk_kdev(MAJOR_NR,i<<6), 1<<6, + &xd_fops, xd_info[i].heads * xd_info[i].cylinders * xd_info[i].sectors); } @@ -287,8 +288,9 @@ INIT_REQUEST; /* do some checking on the request structure */ if (CURRENT_DEV < xd_drives + && (CURRENT->flags & REQ_CMD) && CURRENT->sector + CURRENT->nr_sectors - <= xd_struct[MINOR(CURRENT->rq_dev)].nr_sects) { + <= xd_struct[minor(CURRENT->rq_dev)].nr_sects) { block = CURRENT->sector; count = CURRENT->nr_sectors; @@ -312,7 +314,7 @@ { int dev; - if ((!inode) || !(inode->i_rdev)) + if ((!inode) || kdev_none(inode->i_rdev)) return -EINVAL; dev = DEVICE_NR(inode->i_rdev);
--pWyiEgJYm5f9v55/-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/