mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@transmeta.com>,
	Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] Ataflop fix
Date: Sun, 11 May 2003 12:31:07 +0200	[thread overview]
Message-ID: <200305111031.h4BAV7an019742@callisto.of.borg> (raw)

Ataflop: fix breakage after recent cleanups

--- linux-2.5.x/drivers/block/ataflop.c	Mon May  5 10:30:51 2003
+++ linux-m68k-2.5.x/drivers/block/ataflop.c	Thu May  8 09:16:18 2003
@@ -1570,7 +1571,7 @@
 		 */
 
 		/* get the parameters from user space */
-		if (p->ref != 1 && p->ref != -1)
+		if (floppy->ref != 1 && floppy->ref != -1)
 			return -EBUSY;
 		if (copy_from_user(&setprm, (void *) param, sizeof(setprm)))
 			return -EFAULT;
@@ -1617,7 +1618,7 @@
 				    printk (KERN_INFO "floppy%d: setting %s %p!\n",
 				        drive, dtp->name, dtp);
 				UDT = dtp;
-				set_capacity(p->disk, UDT->blocks);
+				set_capacity(floppy->disk, UDT->blocks);
 
 				if (cmd == FDDEFPRM) {
 				  /* save settings as permanent default type */
@@ -1663,7 +1664,7 @@
 		}
 
 		UDT = dtp;
-		set_capacity(p->disk, UDT->blocks);
+		set_capacity(floppy->disk, UDT->blocks);
 
 		return 0;
 	case FDMSGON:
@@ -1677,7 +1678,7 @@
 	case FDFMTBEG:
 		return 0;
 	case FDFMTTRK:
-		if (p->ref != 1 && p->ref != -1)
+		if (floppy->ref != 1 && floppy->ref != -1)
 			return -EBUSY;
 		if (copy_from_user(&fmt_desc, (void *) param, sizeof(fmt_desc)))
 			return -EFAULT;
@@ -1686,7 +1687,7 @@
 		UDT = NULL;
 		/* MSch: invalidate default_params */
 		default_params[drive].blocks  = 0;
-		set_capacity(p->disk, MAX_DISK_SIZE * 2);
+		set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
 	case FDFMTEND:
 	case FDFLUSH:
 		/* invalidate the buffer track to force a reread */

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

                 reply	other threads:[~2003-05-11 10:26 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=200305111031.h4BAV7an019742@callisto.of.borg \
    --to=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®