aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/das08_cs.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-06-24 16:55:44 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 14:04:59 -0700
commit0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a (patch)
tree0cff143ffb15d26181eb5f2d04f95d592cb63106 /drivers/staging/comedi/drivers/das08_cs.c
parentstaging: comedi: drivers: introduce comedi_alloc_devpriv() (diff)
downloadlinux-dev-0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a.tar.xz
linux-dev-0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a.zip
staging: comedi: use comedi_alloc_devpriv()
Use the helper function to allocate memory and set the comedi_device private data pointer. This removes the dependency on slab.h from most of the drivers so remove the global #include in comedidev.h and the local #include in some of the drivers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/das08_cs.c')
-rw-r--r--drivers/staging/comedi/drivers/das08_cs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c
index 885fb179c9b4..24a3922ddd9a 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -40,7 +40,6 @@ Command support does not exist, but could be added for this board.
*/
#include <linux/delay.h>
-#include <linux/slab.h>
#include "../comedidev.h"
@@ -78,10 +77,9 @@ static int das08_cs_auto_attach(struct comedi_device *dev,
return ret;
iobase = link->resource[0]->start;
- devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
+ devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
if (!devpriv)
return -ENOMEM;
- dev->private = devpriv;
return das08_common_attach(dev, iobase);
}