X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fide%2Fide-floppy.c;h=cdfadb01d07f3f9dd814bd5b8d71f29db5103a68;hb=97100fc816badbbc162644cfde7ad39ae9211fb4;hp=a11ec86925a36a687e2e45fd74c1e0f777911bf3;hpb=be3c096ebdbe3c828aacb5473751a22840753eff;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index a11ec86925a..cdfadb01d07 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) int ret; /* do not scan partitions twice if this is a removable device */ - if (drive->attach) { - drive->attach = 0; + if (drive->dev_flags & IDE_DFLAG_ATTACH) { + drive->dev_flags &= ~IDE_DFLAG_ATTACH; return 0; } ret = !!(drive->atapi_flags & IDE_AFLAG_MEDIA_CHANGED); @@ -896,12 +896,13 @@ static int ide_floppy_probe(ide_drive_t *drive) drive->debug_mask = debug_mask; idefloppy_setup(drive, floppy); + drive->dev_flags |= IDE_DFLAG_ATTACH; g->minors = 1 << PARTN_BITS; g->driverfs_dev = &drive->gendev; - g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; + if (drive->dev_flags & IDE_DFLAG_REMOVABLE) + g->flags = GENHD_FL_REMOVABLE; g->fops = &idefloppy_ops; - drive->attach = 1; add_disk(g); return 0;