ide: IDE_AFLAG_WP -> IDE_DFLAG_WP

There should be no functional changes caused by this patch.
Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent fe11edfa
...@@ -410,11 +410,11 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive) ...@@ -410,11 +410,11 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive)
} }
if (pc.buf[3] & 0x80) if (pc.buf[3] & 0x80)
drive->atapi_flags |= IDE_AFLAG_WP; drive->dev_flags |= IDE_DFLAG_WP;
else else
drive->atapi_flags &= ~IDE_AFLAG_WP; drive->dev_flags &= ~IDE_DFLAG_WP;
set_disk_ro(disk, !!(drive->atapi_flags & IDE_AFLAG_WP)); set_disk_ro(disk, !!(drive->dev_flags & IDE_DFLAG_WP));
page = &pc.buf[8]; page = &pc.buf[8];
...@@ -684,7 +684,7 @@ static int idefloppy_open(struct inode *inode, struct file *filp) ...@@ -684,7 +684,7 @@ static int idefloppy_open(struct inode *inode, struct file *filp)
goto out_put_floppy; goto out_put_floppy;
} }
if ((drive->atapi_flags & IDE_AFLAG_WP) && (filp->f_mode & 2)) { if ((drive->dev_flags & IDE_DFLAG_WP) && (filp->f_mode & 2)) {
ret = -EROFS; ret = -EROFS;
goto out_put_floppy; goto out_put_floppy;
} }
......
...@@ -503,8 +503,6 @@ enum { ...@@ -503,8 +503,6 @@ enum {
IDE_AFLAG_CLIK_DRIVE = (1 << 19), IDE_AFLAG_CLIK_DRIVE = (1 << 19),
/* Requires BH algorithm for packets */ /* Requires BH algorithm for packets */
IDE_AFLAG_ZIP_DRIVE = (1 << 20), IDE_AFLAG_ZIP_DRIVE = (1 << 20),
/* Write protect */
IDE_AFLAG_WP = (1 << 21),
/* Supports format progress report */ /* Supports format progress report */
IDE_AFLAG_SRFP = (1 << 22), IDE_AFLAG_SRFP = (1 << 22),
...@@ -579,6 +577,8 @@ enum { ...@@ -579,6 +577,8 @@ enum {
/* heads unloaded, please don't reset port */ /* heads unloaded, please don't reset port */
IDE_DFLAG_PARKED = (1 << 28), IDE_DFLAG_PARKED = (1 << 28),
IDE_DFLAG_MEDIA_CHANGED = (1 << 29), IDE_DFLAG_MEDIA_CHANGED = (1 << 29),
/* write protect */
IDE_DFLAG_WP = (1 << 30),
}; };
struct ide_drive_s { struct ide_drive_s {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment