diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-10-23 13:22:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-23 20:28:19 -0700 |
commit | c34fa261b0ac3a862ccd3f71ee55a16b920dfc83 (patch) | |
tree | ae5af03ada6b3cddb532e36c1110c13d103adf5a /drivers/staging/comedi/drivers/cb_pcimdas.c | |
parent | a51d02067efc069aab14b221b625bd82d8e659dd (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/cb_pcimdas.c')
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcimdas.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index d1c7220c0b7b..9df9a02553c0 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -219,10 +219,10 @@ static int cb_pcimdas_attach_pci(struct comedi_device *dev, dev->board_name = dev->driver->driver_name; - ret = alloc_private(dev, sizeof(*devpriv)); - if (ret) - return ret; - devpriv = dev->private; + devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); + if (!devpriv) + return -ENOMEM; + dev->private = devpriv; ret = comedi_pci_enable(pcidev, dev->board_name); if (ret) |