diff options
Diffstat (limited to 'drivers/dma/ioat/pci.c')
-rw-r--r-- | drivers/dma/ioat/pci.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c index d545fae30f37..fab37d1cf48d 100644 --- a/drivers/dma/ioat/pci.c +++ b/drivers/dma/ioat/pci.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/dca.h> | 32 | #include <linux/dca.h> |
33 | #include <linux/slab.h> | ||
33 | #include "dma.h" | 34 | #include "dma.h" |
34 | #include "dma_v2.h" | 35 | #include "dma_v2.h" |
35 | #include "registers.h" | 36 | #include "registers.h" |
@@ -137,15 +138,10 @@ static int __devinit ioat_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
137 | if (err) | 138 | if (err) |
138 | return err; | 139 | return err; |
139 | 140 | ||
140 | device = devm_kzalloc(dev, sizeof(*device), GFP_KERNEL); | ||
141 | if (!device) | ||
142 | return -ENOMEM; | ||
143 | |||
144 | pci_set_master(pdev); | ||
145 | |||
146 | device = alloc_ioatdma(pdev, iomap[IOAT_MMIO_BAR]); | 141 | device = alloc_ioatdma(pdev, iomap[IOAT_MMIO_BAR]); |
147 | if (!device) | 142 | if (!device) |
148 | return -ENOMEM; | 143 | return -ENOMEM; |
144 | pci_set_master(pdev); | ||
149 | pci_set_drvdata(pdev, device); | 145 | pci_set_drvdata(pdev, device); |
150 | 146 | ||
151 | device->version = readb(device->reg_base + IOAT_VER_OFFSET); | 147 | device->version = readb(device->reg_base + IOAT_VER_OFFSET); |