Merge branch 'sii-m15w' into upstream
[pandora-kernel.git] / drivers / scsi / mesh.c
index bdccf73..5572981 100644 (file)
@@ -18,7 +18,6 @@
  * - retry arbitration if lost (unless higher levels do this for us)
  * - power down the chip when no device is detected
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
@@ -1269,7 +1268,7 @@ static void set_dma_cmds(struct mesh_state *ms, struct scsi_cmnd *cmd)
                if (cmd->use_sg > 0) {
                        int nseg;
                        total = 0;
-                       scl = (struct scatterlist *) cmd->buffer;
+                       scl = (struct scatterlist *) cmd->request_buffer;
                        off = ms->data_ptr;
                        nseg = pci_map_sg(ms->pdev, scl, cmd->use_sg,
                                          cmd->sc_data_direction);
@@ -1748,7 +1747,7 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)
 
 static void set_mesh_power(struct mesh_state *ms, int state)
 {
-       if (_machine != _MACH_Pmac)
+       if (!machine_is(powermac))
                return;
        if (state) {
                pmac_call_feature(PMAC_FTR_MESH_ENABLE, macio_get_of_node(ms->mdev), 0, 1);
@@ -1869,7 +1868,8 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
 
        if (macio_resource_count(mdev) != 2 || macio_irq_count(mdev) != 2) {
                        printk(KERN_ERR "mesh: expected 2 addrs and 2 intrs"
-                      " (got %d,%d)\n", mesh->n_addrs, mesh->n_intrs);
+                      " (got %d,%d)\n", macio_resource_count(mdev),
+                      macio_irq_count(mdev));
                return -ENODEV;
        }