Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
[cascardo/linux.git] / drivers / block / ps3disk.c
index 4b7e405..76f33c8 100644 (file)
@@ -196,7 +196,7 @@ static void ps3disk_do_request(struct ps3_storage_device *dev,
        dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);
 
        while ((req = blk_fetch_request(q))) {
-               if (req->cmd_flags & REQ_FLUSH) {
+               if (req_op(req) == REQ_OP_FLUSH) {
                        if (ps3disk_submit_flush_request(dev, req))
                                break;
                } else if (req->cmd_type == REQ_TYPE_FS) {
@@ -256,7 +256,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
                return IRQ_HANDLED;
        }
 
-       if (req->cmd_flags & REQ_FLUSH) {
+       if (req_op(req) == REQ_OP_FLUSH) {
                read = 0;
                op = "flush";
        } else {
@@ -487,7 +487,6 @@ static int ps3disk_probe(struct ps3_system_bus_device *_dev)
        gendisk->fops = &ps3disk_fops;
        gendisk->queue = queue;
        gendisk->private_data = dev;
-       gendisk->driverfs_dev = &dev->sbd.core;
        snprintf(gendisk->disk_name, sizeof(gendisk->disk_name), PS3DISK_NAME,
                 devidx+'a');
        priv->blocking_factor = dev->blk_size >> 9;
@@ -499,7 +498,7 @@ static int ps3disk_probe(struct ps3_system_bus_device *_dev)
                 gendisk->disk_name, priv->model, priv->raw_capacity >> 11,
                 get_capacity(gendisk) >> 11);
 
-       add_disk(gendisk);
+       device_add_disk(&dev->sbd.core, gendisk);
        return 0;
 
 fail_cleanup_queue: