KVM: VMX: Add facility to atomically switch MSRs on guest entry/exit
[safe/jmp/linux-2.6] / drivers / scsi / nsp32.c
index 8cc9e64..4c1e545 100644 (file)
  *   1.2: PowerPC (big endian) support.
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/ioport.h>
@@ -299,9 +297,9 @@ static struct scsi_host_template nsp32_template = {
 #else
 # define NSP32_DEBUG_MASK            0xffffff
 # define nsp32_msg(type, args...) \
-       nsp32_message (__FUNCTION__, __LINE__, (type), args)
+       nsp32_message (__func__, __LINE__, (type), args)
 # define nsp32_dbg(mask, args...) \
-       nsp32_dmessage(__FUNCTION__, __LINE__, (mask), args)
+       nsp32_dmessage(__func__, __LINE__, (mask), args)
 #endif
 
 #define NSP32_DEBUG_QUEUECOMMAND       BIT(0)
@@ -1420,7 +1418,7 @@ static irqreturn_t do_nsp32_isr(int irq, void *dev_id)
                nsp32_msg(KERN_ERR, "Received unexpected BMCNTERR IRQ! ");
                /*
                 * TODO: To be implemented improving bus master
-                * transfer reliablity when BMCNTERR is occurred in
+                * transfer reliability when BMCNTERR is occurred in
                 * AutoSCSI phase described in specification.
                 */
        }
@@ -2673,7 +2671,7 @@ static int nsp32_detect(struct pci_dev *pdev)
        /*
         * setup DMA 
         */
-       if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
+       if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
                nsp32_msg (KERN_ERR, "failed to set PCI DMA mask");
                goto scsi_unregister;
        }
@@ -3379,15 +3377,6 @@ static int nsp32_resume(struct pci_dev *pdev)
        return 0;
 }
 
-/* Enable wake event */
-static int nsp32_enable_wake(struct pci_dev *pdev, pci_power_t state, int enable)
-{
-       struct Scsi_Host *host = pci_get_drvdata(pdev);
-
-       nsp32_msg(KERN_INFO, "pci-enable_wake: stub, pdev=0x%p, enable=%d, slot=%s, host=0x%p", pdev, enable, pci_name(pdev), host);
-
-       return 0;
-}
 #endif
 
 /************************************************************************
@@ -3411,8 +3400,7 @@ static int __devinit nsp32_probe(struct pci_dev *pdev, const struct pci_device_i
        data->IrqNumber   = pdev->irq;
        data->BaseAddress = pci_resource_start(pdev, 0);
        data->NumAddress  = pci_resource_len  (pdev, 0);
-       data->MmioAddress = ioremap_nocache(pci_resource_start(pdev, 1),
-                                              pci_resource_len  (pdev, 1));
+       data->MmioAddress = pci_ioremap_bar(pdev, 1);
        data->MmioLength  = pci_resource_len  (pdev, 1);
 
        pci_set_master(pdev);
@@ -3451,7 +3439,6 @@ static struct pci_driver nsp32_driver = {
 #ifdef CONFIG_PM
        .suspend        = nsp32_suspend, 
        .resume         = nsp32_resume, 
-       .enable_wake    = nsp32_enable_wake,
 #endif
 };