tree-wide: fix assorted typos all over the place
[safe/jmp/linux-2.6] / drivers / crypto / hifn_795x.c
index ab4f94b..09ad915 100644 (file)
@@ -863,7 +863,7 @@ static int hifn_init_pubrng(struct hifn_device *dev)
                dev->dmareg |= HIFN_DMAIER_PUBDONE;
                hifn_write_1(dev, HIFN_1_DMA_IER, dev->dmareg);
 
-               dprintk("Chip %s: Public key engine has been sucessfully "
+               dprintk("Chip %s: Public key engine has been successfully "
                                "initialised.\n", dev->name);
        }
 
@@ -1393,10 +1393,12 @@ static int hifn_setup_dma(struct hifn_device *dev,
        n = nbytes;
        while (n) {
                if (t->length && rctx->walk.flags & ASYNC_FLAGS_MISALIGNED) {
+                       BUG_ON(!sg_page(t));
                        dpage = sg_page(t);
                        doff = 0;
                        len = t->length;
                } else {
+                       BUG_ON(!sg_page(dst));
                        dpage = sg_page(dst);
                        doff = dst->offset;
                        len = dst->length;
@@ -1791,17 +1793,17 @@ static void hifn_process_ready(struct ablkcipher_request *req, int error)
                                continue;
                        }
 
-                       saddr = kmap_atomic(sg_page(t), KM_IRQ1);
+                       saddr = kmap_atomic(sg_page(t), KM_SOFTIRQ0);
 
                        err = ablkcipher_get(saddr, &t->length, t->offset,
                                        dst, nbytes, &nbytes);
                        if (err < 0) {
-                               kunmap_atomic(saddr, KM_IRQ1);
+                               kunmap_atomic(saddr, KM_SOFTIRQ0);
                                break;
                        }
 
                        idx += err;
-                       kunmap_atomic(saddr, KM_IRQ1);
+                       kunmap_atomic(saddr, KM_SOFTIRQ0);
                }
 
                ablkcipher_walk_exit(&rctx->walk);
@@ -1880,7 +1882,7 @@ static void hifn_clear_rings(struct hifn_device *dev, int error)
 
 static void hifn_work(struct work_struct *work)
 {
-       struct delayed_work *dw = container_of(work, struct delayed_work, work);
+       struct delayed_work *dw = to_delayed_work(work);
        struct hifn_device *dev = container_of(dw, struct hifn_device, work);
        unsigned long flags;
        int reset = 0;
@@ -2562,7 +2564,7 @@ static void hifn_tasklet_callback(unsigned long data)
                hifn_process_queue(dev);
 }
 
-static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+static int __devinit hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        int err, i;
        struct hifn_device *dev;
@@ -2573,7 +2575,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                return err;
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
        if (err)
                goto err_out_disable_pci_device;
 
@@ -2694,7 +2696,7 @@ err_out_disable_pci_device:
        return err;
 }
 
-static void hifn_remove(struct pci_dev *pdev)
+static void __devexit hifn_remove(struct pci_dev *pdev)
 {
        int i;
        struct hifn_device *dev;
@@ -2742,7 +2744,7 @@ static struct pci_driver hifn_pci_driver = {
        .remove   = __devexit_p(hifn_remove),
 };
 
-static int __devinit hifn_init(void)
+static int __init hifn_init(void)
 {
        unsigned int freq;
        int err;
@@ -2787,7 +2789,7 @@ static int __devinit hifn_init(void)
        return 0;
 }
 
-static void __devexit hifn_fini(void)
+static void __exit hifn_fini(void)
 {
        pci_unregister_driver(&hifn_pci_driver);