include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / ide / ide-cd_ioctl.c
index 74231b41f611b5c63a2e60198ab9b742405deb33..02712bf045c1bdece00d845d35662fd065e12c41 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/kernel.h>
 #include <linux/cdrom.h>
+#include <linux/gfp.h>
 #include <linux/ide.h>
 #include <scsi/scsi.h>
 
@@ -86,8 +87,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;
@@ -136,7 +137,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,
                sense = &my_sense;
 
        /* If the drive cannot lock the door, just pretend. */
-       if (drive->atapi_flags & IDE_AFLAG_NO_DOORLOCK) {
+       if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0) {
                stat = 0;
        } else {
                unsigned char cmd[BLK_MAX_CDB];
@@ -157,7 +158,7 @@ int ide_cd_lockdoor(ide_drive_t *drive, int lockflag,
            (sense->asc == 0x24 || sense->asc == 0x20)) {
                printk(KERN_ERR "%s: door locking not supported\n",
                        drive->name);
-               drive->atapi_flags |= IDE_AFLAG_NO_DOORLOCK;
+               drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING;
                stat = 0;
        }