diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:36 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:36 -0400 |
commit | 97100fc816badbbc162644cfde7ad39ae9211fb4 (patch) | |
tree | 904faf5453c2dea32fa3fde5fda230118f3effda /drivers/ide/ide-floppy.c | |
parent | be3c096ebdbe3c828aacb5473751a22840753eff (diff) |
ide: add device flags
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.
While at it:
- IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
- fixup some comments
- remove needless g->flags zeroing from ide*_probe()
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index a11ec86925a3..cdfadb01d07f 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -828,8 +828,8 @@ static int idefloppy_media_changed(struct gendisk *disk) | |||
828 | int ret; | 828 | int ret; |
829 | 829 | ||
830 | /* do not scan partitions twice if this is a removable device */ | 830 | /* do not scan partitions twice if this is a removable device */ |
831 | if (drive->attach) { | 831 | if (drive->dev_flags & IDE_DFLAG_ATTACH) { |
832 | drive->attach = 0; | 832 | drive->dev_flags &= ~IDE_DFLAG_ATTACH; |
833 | return 0; | 833 | return 0; |
834 | } | 834 | } |
835 | ret = !!(drive->atapi_flags & IDE_AFLAG_MEDIA_CHANGED); | 835 | ret = !!(drive->atapi_flags & IDE_AFLAG_MEDIA_CHANGED); |
@@ -896,12 +896,13 @@ static int ide_floppy_probe(ide_drive_t *drive) | |||
896 | drive->debug_mask = debug_mask; | 896 | drive->debug_mask = debug_mask; |
897 | 897 | ||
898 | idefloppy_setup(drive, floppy); | 898 | idefloppy_setup(drive, floppy); |
899 | drive->dev_flags |= IDE_DFLAG_ATTACH; | ||
899 | 900 | ||
900 | g->minors = 1 << PARTN_BITS; | 901 | g->minors = 1 << PARTN_BITS; |
901 | g->driverfs_dev = &drive->gendev; | 902 | g->driverfs_dev = &drive->gendev; |
902 | g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; | 903 | if (drive->dev_flags & IDE_DFLAG_REMOVABLE) |
904 | g->flags = GENHD_FL_REMOVABLE; | ||
903 | g->fops = &idefloppy_ops; | 905 | g->fops = &idefloppy_ops; |
904 | drive->attach = 1; | ||
905 | add_disk(g); | 906 | add_disk(g); |
906 | return 0; | 907 | return 0; |
907 | 908 | ||