summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/me4000.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-10-23 13:22:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-23 20:28:19 -0700
commitc34fa261b0ac3a862ccd3f71ee55a16b920dfc83 (patch)
treeae5af03ada6b3cddb532e36c1110c13d103adf5a /drivers/staging/comedi/drivers/me4000.c
parenta51d02067efc069aab14b221b625bd82d8e659dd (diff)
staging: comedi: remove inline alloc_private()
This inline function has a very generic name and it's only a wrapper around a simple kzalloc(). Since the inline function does not save any lines-of-code, instead of renaming it just remove it and do the kzalloc() directly. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/me4000.c')
-rw-r--r--drivers/staging/comedi/drivers/me4000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 22db35d091f8..ae91837fe7eb 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -1586,10 +1586,10 @@ static int me4000_attach_pci(struct comedi_device *dev,
dev->board_ptr = thisboard;
dev->board_name = thisboard->name;
- result = alloc_private(dev, sizeof(*info));
- if (result)
- return result;
- info = dev->private;
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+ dev->private = info;
result = comedi_pci_enable(pcidev, dev->board_name);
if (result)