All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <p_gortmaker@yahoo.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] kdev_t changes for ide/hd.c
Date: Wed, 06 Feb 2002 04:18:38 -0500	[thread overview]
Message-ID: <3C60F4EE.40BF2769@yahoo.com> (raw)

Seems that 2.5.3 needs these additional changes for drivers/ide/hd.c to work:

	MINOR -> minor
	MKDEV -> mk_kdev
	!(...) -> kdev_none(...)

The bio changes must be okay as it now passes the "yep, it boots" test.  :)

Paul.


--- drivers/ide/hd.c~	Tue Feb  5 02:39:46 2002
+++ drivers/ide/hd.c	Wed Feb  6 02:14:58 2002
@@ -558,7 +558,7 @@
 		reset_hd();
 		return;
 	}
-	dev = MINOR(CURRENT->rq_dev);
+	dev = minor(CURRENT->rq_dev);
 	block = CURRENT->sector;
 	nsect = CURRENT->nr_sectors;
 	if (dev >= (NR_HD<<6) || (dev & 0x3f) ||
@@ -568,7 +568,7 @@
 			       kdevname(CURRENT->rq_dev));
 		else
 			printk("hd%c: bad access: block=%d, count=%d\n",
-				(MINOR(CURRENT->rq_dev)>>6)+'a', block, nsect);
+				(minor(CURRENT->rq_dev)>>6)+'a', block, nsect);
 		end_request(0);
 		goto repeat;
 	}
@@ -626,7 +626,7 @@
 	struct hd_geometry *loc = (struct hd_geometry *) arg;
 	int dev;
 
-	if ((!inode) || !(inode->i_rdev))
+	if ((!inode) || kdev_none(inode->i_rdev))
 		return -EINVAL;
 	dev = DEVICE_NR(inode->i_rdev);
 	if (dev >= NR_HD)
@@ -824,7 +824,7 @@
 	hd_gendisk.nr_real = NR_HD;
 
 	for(drive=0; drive < NR_HD; drive++)
-		register_disk(&hd_gendisk, MKDEV(MAJOR_NR,drive<<6), 1<<6,
+		register_disk(&hd_gendisk, mk_kdev(MAJOR_NR,drive<<6), 1<<6,
 			&hd_fops, hd_info[drive].head * hd_info[drive].sect *
 			hd_info[drive].cyl);
 }




                 reply	other threads:[~2002-02-06  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C60F4EE.40BF2769@yahoo.com \
    --to=p_gortmaker@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.