]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGED
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 17 Oct 2008 16:09:11 +0000 (18:09 +0200)
There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-floppy.c
include/linux/ide.h

index 3308b1cd3a335de2cf4da4867ec7ca2597649f5a..7dc1a17a4dd806d6feaeaa8ccca3507a137ddb16 100644 (file)
@@ -99,7 +99,7 @@ static void ide_cd_put(struct cdrom_info *cd)
 /* Mark that we've seen a media change and invalidate our internal buffers. */
 static void cdrom_saw_media_change(ide_drive_t *drive)
 {
-       drive->atapi_flags |= IDE_AFLAG_MEDIA_CHANGED;
+       drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
        drive->atapi_flags &= ~IDE_AFLAG_TOC_VALID;
 }
 
@@ -1986,8 +1986,8 @@ static int ide_cdrom_setup(ide_drive_t *drive)
        if (!drive->queue->unplug_delay)
                drive->queue->unplug_delay = 1;
 
-       drive->atapi_flags = IDE_AFLAG_MEDIA_CHANGED | IDE_AFLAG_NO_EJECT |
-                      ide_cd_flags(id);
+       drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
+       drive->atapi_flags = IDE_AFLAG_NO_EJECT | ide_cd_flags(id);
 
        if ((drive->atapi_flags & IDE_AFLAG_VERTOS_300_SSD) &&
            fw_rev[4] == '1' && fw_rev[6] <= '2')
index 74231b41f611b5c63a2e60198ab9b742405deb33..37d89ead13dd75a260bdb7491be8387feb1492e4 100644 (file)
@@ -86,8 +86,8 @@ int ide_cdrom_check_media_change_real(struct cdrom_device_info *cdi,
 
        if (slot_nr == CDSL_CURRENT) {
                (void) cdrom_check_status(drive, NULL);
-               retval = (drive->atapi_flags & IDE_AFLAG_MEDIA_CHANGED) ? 1 : 0;
-               drive->atapi_flags &= ~IDE_AFLAG_MEDIA_CHANGED;
+               retval = (drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED) ? 1 : 0;
+               drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED;
                return retval;
        } else {
                return -EINVAL;
index 3271e56d091c2ace061e21a9f687a1fd7c1a21ec..df410c7191ac66081c9acdc4936e7a12ca6cc6f7 100644 (file)
@@ -689,8 +689,8 @@ static int idefloppy_open(struct inode *inode, struct file *filp)
                        goto out_put_floppy;
                }
 
-               drive->atapi_flags |= IDE_AFLAG_MEDIA_CHANGED;
                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) {
                ret = -EBUSY;
@@ -747,8 +747,8 @@ static int idefloppy_media_changed(struct gendisk *disk)
                drive->dev_flags &= ~IDE_DFLAG_ATTACH;
                return 0;
        }
-       ret = !!(drive->atapi_flags & IDE_AFLAG_MEDIA_CHANGED);
-       drive->atapi_flags &= ~IDE_AFLAG_MEDIA_CHANGED;
+       ret = !!(drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED);
+       drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED;
        return ret;
 }
 
index c47e371554c1ccb122945ab087eb4c9914480010..155a57f55c606e2057c0571609d2d98b8e060204 100644 (file)
@@ -464,7 +464,6 @@ struct ide_acpi_hwif_link;
 /* ATAPI device flags */
 enum {
        IDE_AFLAG_DRQ_INTERRUPT         = (1 << 0),
-       IDE_AFLAG_MEDIA_CHANGED         = (1 << 1),
        /* Drive cannot lock the door. */
        IDE_AFLAG_NO_DOORLOCK           = (1 << 2),
 
@@ -578,7 +577,8 @@ enum {
        /* don't unload heads */
        IDE_DFLAG_NO_UNLOAD             = (1 << 27),
        /* heads unloaded, please don't reset port */
-       IDE_DFLAG_PARKED                = (1 << 28)
+       IDE_DFLAG_PARKED                = (1 << 28),
+       IDE_DFLAG_MEDIA_CHANGED         = (1 << 29),
 };
 
 struct ide_drive_s {