aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-floppy.c8
-rw-r--r--include/linux/ide.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index df410c7191ac..8078e0826cd3 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -410,11 +410,11 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive)
410 } 410 }
411 411
412 if (pc.buf[3] & 0x80) 412 if (pc.buf[3] & 0x80)
413 drive->atapi_flags |= IDE_AFLAG_WP; 413 drive->dev_flags |= IDE_DFLAG_WP;
414 else 414 else
415 drive->atapi_flags &= ~IDE_AFLAG_WP; 415 drive->dev_flags &= ~IDE_DFLAG_WP;
416 416
417 set_disk_ro(disk, !!(drive->atapi_flags & IDE_AFLAG_WP)); 417 set_disk_ro(disk, !!(drive->dev_flags & IDE_DFLAG_WP));
418 418
419 page = &pc.buf[8]; 419 page = &pc.buf[8];
420 420
@@ -684,7 +684,7 @@ static int idefloppy_open(struct inode *inode, struct file *filp)
684 goto out_put_floppy; 684 goto out_put_floppy;
685 } 685 }
686 686
687 if ((drive->atapi_flags & IDE_AFLAG_WP) && (filp->f_mode & 2)) { 687 if ((drive->dev_flags & IDE_DFLAG_WP) && (filp->f_mode & 2)) {
688 ret = -EROFS; 688 ret = -EROFS;
689 goto out_put_floppy; 689 goto out_put_floppy;
690 } 690 }
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 155a57f55c60..bd0a4d36b6d3 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -503,8 +503,6 @@ enum {
503 IDE_AFLAG_CLIK_DRIVE = (1 << 19), 503 IDE_AFLAG_CLIK_DRIVE = (1 << 19),
504 /* Requires BH algorithm for packets */ 504 /* Requires BH algorithm for packets */
505 IDE_AFLAG_ZIP_DRIVE = (1 << 20), 505 IDE_AFLAG_ZIP_DRIVE = (1 << 20),
506 /* Write protect */
507 IDE_AFLAG_WP = (1 << 21),
508 /* Supports format progress report */ 506 /* Supports format progress report */
509 IDE_AFLAG_SRFP = (1 << 22), 507 IDE_AFLAG_SRFP = (1 << 22),
510 508
@@ -579,6 +577,8 @@ enum {
579 /* heads unloaded, please don't reset port */ 577 /* heads unloaded, please don't reset port */
580 IDE_DFLAG_PARKED = (1 << 28), 578 IDE_DFLAG_PARKED = (1 << 28),
581 IDE_DFLAG_MEDIA_CHANGED = (1 << 29), 579 IDE_DFLAG_MEDIA_CHANGED = (1 << 29),
580 /* write protect */
581 IDE_DFLAG_WP = (1 << 30),
582}; 582};
583 583
584struct ide_drive_s { 584struct ide_drive_s {