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/poc.c | |
parent | a51d02067efc069aab14b221b625bd82d8e659dd (diff) | |
download | linux-rt-c34fa261b0ac3a862ccd3f71ee55a16b920dfc83.tar.gz |
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/poc.c')
-rw-r--r-- | drivers/staging/comedi/drivers/poc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index 8e70affb331a..d7842c95d982 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -167,10 +167,10 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (ret) return ret; - 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; /* analog output subdevice */ s = &dev->subdevices[0]; |