[PATCH 11/18] ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESS

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bartlomiej Zolnierkiewicz
Date: Sunday, September 7, 2008 - 3:15 pm

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-floppy.c       |    6 +++---
 drivers/ide/ide-floppy_ioctl.c |    6 +++---
 include/linux/ide.h            |    3 +--
 3 files changed, 7 insertions(+), 8 deletions(-)

Index: b/drivers/ide/ide-floppy.c
===================================================================
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -664,7 +664,7 @@ static int idefloppy_open(struct inode *
 	floppy->openers++;
 
 	if (floppy->openers == 1) {
-		drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS;
+		drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS;
 		/* Just in case */
 
 		if (ide_do_test_unit_ready(drive, disk))
@@ -692,7 +692,7 @@ static int idefloppy_open(struct inode *
 		ide_set_media_lock(drive, disk, 1);
 		drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
 		check_disk_change(inode->i_bdev);
-	} else if (drive->atapi_flags & IDE_AFLAG_FORMAT_IN_PROGRESS) {
+	} else if (drive->dev_flags & IDE_DFLAG_FORMAT_IN_PROGRESS) {
 		ret = -EBUSY;
 		goto out_put_floppy;
 	}
@@ -714,7 +714,7 @@ static int idefloppy_release(struct inod
 
 	if (floppy->openers == 1) {
 		ide_set_media_lock(drive, disk, 0);
-		drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS;
+		drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS;
 	}
 
 	floppy->openers--;
Index: b/drivers/ide/ide-floppy_ioctl.c
===================================================================
--- a/drivers/ide/ide-floppy_ioctl.c
+++ b/drivers/ide/ide-floppy_ioctl.c
@@ -138,11 +138,11 @@ static int ide_floppy_format_unit(ide_dr
 
 	if (floppy->openers > 1) {
 		/* Don't format if someone is using the disk */
-		drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS;
+		drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS;
 		return -EBUSY;
 	}
 
-	drive->atapi_flags |= IDE_AFLAG_FORMAT_IN_PROGRESS;
+	drive->dev_flags |= IDE_DFLAG_FORMAT_IN_PROGRESS;
 
 	/*
 	 * Send ATAPI_FORMAT_UNIT to the drive.
@@ -174,7 +174,7 @@ static int ide_floppy_format_unit(ide_dr
 
 out:
 	if (err)
-		drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS;
+		drive->dev_flags &= ~IDE_DFLAG_FORMAT_IN_PROGRESS;
 	return err;
 }
 
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -495,8 +495,6 @@ enum {
 	IDE_AFLAG_LE_SPEED_FIELDS	= (1 << 17),
 
 	/* ide-floppy */
-	/* Format in progress */
-	IDE_AFLAG_FORMAT_IN_PROGRESS	= (1 << 18),
 	/* Avoid commands not supported in Clik drive */
 	IDE_AFLAG_CLIK_DRIVE		= (1 << 19),
 	/* Requires BH algorithm for packets */
@@ -571,6 +569,7 @@ enum {
 	IDE_DFLAG_MEDIA_CHANGED		= (1 << 27),
 	/* write protect */
 	IDE_DFLAG_WP			= (1 << 28),
+	IDE_DFLAG_FORMAT_IN_PROGRESS	= (1 << 29),
 };
 
 struct ide_drive_s {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/18] ide: add generic ATA/ATAPI disk driver, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 01/18] ide-disk: fix IDE_DFLAG_LBA48 handling on resume, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 02/18] ide-disk: lock media before checking for med ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 03/18] ide-floppy: use alloc_disk_node(), Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 04/18] ide-disk: use to_ide_drv() and ide_drv_g(), Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 05/18] ide-disk: move IDE_DFLAG_DOORLOCKING flag ha ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:14 pm)
[PATCH 06/18] ide-{disk,floppy}: set IDE_DFLAG_ATTACH in * ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 07/18] ide-floppy: drop 'floppy' argument from idef ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 08/18] ide-floppy: use drive-&gt;capacity64 for cachin ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 09/18] ide: IDE_AFLAG_MEDIA_CHANGED -&gt; IDE_DFLAG_ME ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 10/18] ide: IDE_AFLAG_WP -&gt; IDE_DFLAG_WP, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 11/18] ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFL ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 12/18] ide: remove IDE_AFLAG_NO_DOORLOCKING, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 13/18] ide-disk: factor out generic disk handling c ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:15 pm)
[PATCH 14/18] ide-disk: use IDE_DFLAG_MEDIA_CHANGED, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:16 pm)
[PATCH 15/18] ide-floppy: factor out generic disk handling ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:16 pm)
[PATCH 16/18] ide: prepare for merging ide-gd-floppy.c wit ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:16 pm)
[PATCH 17/18] ide: allow device drivers to specify per-dev ..., Bartlomiej Zolnierki ..., (Sun Sep 7, 3:16 pm)
[PATCH 18/18] ide: add generic ATA/ATAPI disk driver, Bartlomiej Zolnierki ..., (Sun Sep 7, 3:16 pm)
Re: [PATCH 00/18] ide: add generic ATA/ATAPI disk driver, Borislav Petkov, (Wed Sep 10, 4:20 am)
Re: [PATCH 08/18] ide-floppy: use drive-&gt;capacity64 for ca ..., Bartlomiej Zolnierki ..., (Sat Sep 27, 8:34 am)