Pull sn2-mmio-writes into release branch
[pandora-kernel.git] / drivers / ide / ide-disk.c
index cab362e..09086b8 100644 (file)
@@ -190,7 +190,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
                if (lba48) {
                        task_ioreg_t tasklets[10];
 
-                       pr_debug("%s: LBA=0x%012llx\n", drive->name, block);
+                       pr_debug("%s: LBA=0x%012llx\n", drive->name,
+                                       (unsigned long long)block);
 
                        tasklets[0] = 0;
                        tasklets[1] = 0;
@@ -317,7 +318,8 @@ static ide_startstop_t ide_do_rw_disk (ide_drive_t *drive, struct request *rq, s
 
        pr_debug("%s: %sing: block=%llu, sectors=%lu, buffer=0x%08lx\n",
                 drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
-                block, rq->nr_sectors, (unsigned long)rq->buffer);
+                (unsigned long long)block, rq->nr_sectors,
+                (unsigned long)rq->buffer);
 
        if (hwif->rw_disk)
                hwif->rw_disk(drive, rq);
@@ -477,7 +479,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id)
               && id->lba_capacity_2;
 }
 
-static inline void idedisk_check_hpa(ide_drive_t *drive)
+static void idedisk_check_hpa(ide_drive_t *drive)
 {
        unsigned long long capacity, set_max;
        int lba48 = idedisk_supports_lba48(drive->id);
@@ -776,7 +778,7 @@ static void update_ordered(ide_drive_t *drive)
                         ide_id_has_flush_cache_ext(id));
 
                printk(KERN_INFO "%s: cache flushes %ssupported\n",
-                      drive->name, barrier ? "" : "not");
+                      drive->name, barrier ? "" : "not ");
 
                if (barrier) {
                        ordered = QUEUE_ORDERED_DRAIN_FLUSH;
@@ -889,11 +891,7 @@ static void idedisk_setup (ide_drive_t *drive)
        if (drive->id_read == 0)
                return;
 
-       /*
-        * CompactFlash cards and their brethern look just like hard drives
-        * to us, but they are removable and don't have a doorlock mechanism.
-        */
-       if (drive->removable && !(drive->is_flash)) {
+       if (drive->removable) {
                /*
                 * Removable disks (eg. SYQUEST); ignore 'WD' drives 
                 */
@@ -997,9 +995,8 @@ static void ide_cacheflush_p(ide_drive_t *drive)
                printk(KERN_INFO "%s: wcache flush failed!\n", drive->name);
 }
 
-static int ide_disk_remove(struct device *dev)
+static void ide_disk_remove(ide_drive_t *drive)
 {
-       ide_drive_t *drive = to_ide_device(dev);
        struct ide_disk_obj *idkp = drive->driver_data;
        struct gendisk *g = idkp->disk;
 
@@ -1010,8 +1007,6 @@ static int ide_disk_remove(struct device *dev)
        ide_cacheflush_p(drive);
 
        ide_disk_put(idkp);
-
-       return 0;
 }
 
 static void ide_disk_release(struct kref *kref)
@@ -1027,12 +1022,10 @@ static void ide_disk_release(struct kref *kref)
        kfree(idkp);
 }
 
-static int ide_disk_probe(struct device *dev);
+static int ide_disk_probe(ide_drive_t *drive);
 
-static void ide_device_shutdown(struct device *dev)
+static void ide_device_shutdown(ide_drive_t *drive)
 {
-       ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
-
 #ifdef CONFIG_ALPHA
        /* On Alpha, halt(8) doesn't actually turn the machine off,
           it puts you into the sort of firmware monitor. Typically,
@@ -1054,7 +1047,7 @@ static void ide_device_shutdown(struct device *dev)
        }
 
        printk("Shutdown: %s\n", drive->name);
-       dev->bus->suspend(dev, PMSG_SUSPEND);
+       drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND);
 }
 
 static ide_driver_t idedisk_driver = {
@@ -1062,10 +1055,10 @@ static ide_driver_t idedisk_driver = {
                .owner          = THIS_MODULE,
                .name           = "ide-disk",
                .bus            = &ide_bus_type,
-               .probe          = ide_disk_probe,
-               .remove         = ide_disk_remove,
-               .shutdown       = ide_device_shutdown,
        },
+       .probe                  = ide_disk_probe,
+       .remove                 = ide_disk_remove,
+       .shutdown               = ide_device_shutdown,
        .version                = IDEDISK_VERSION,
        .media                  = ide_disk,
        .supports_dsc_overlap   = 0,
@@ -1182,9 +1175,8 @@ static struct block_device_operations idedisk_ops = {
 
 MODULE_DESCRIPTION("ATA DISK Driver");
 
-static int ide_disk_probe(struct device *dev)
+static int ide_disk_probe(ide_drive_t *drive)
 {
-       ide_drive_t *drive = to_ide_device(dev);
        struct ide_disk_obj *idkp;
        struct gendisk *g;