summaryrefslogtreecommitdiff
path: root/drivers/parport/parport_sunbpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/parport_sunbpp.c')
-rw-r--r--drivers/parport/parport_sunbpp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 5c4b6a1db6ca..dffd6d0bd15b 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -284,12 +284,11 @@ static int bpp_probe(struct platform_device *op)
size = resource_size(&op->resource[0]);
dma = PARPORT_DMA_NONE;
- ops = kmalloc(sizeof(struct parport_operations), GFP_KERNEL);
+ ops = kmemdup(&parport_sunbpp_ops, sizeof(struct parport_operations),
+ GFP_KERNEL);
if (!ops)
goto out_unmap;
- memcpy (ops, &parport_sunbpp_ops, sizeof(struct parport_operations));
-
dprintk(("register_port\n"));
if (!(p = parport_register_port((unsigned long)base, irq, dma, ops)))
goto out_free_ops;