From 0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 24 Jun 2013 16:55:44 -0700 Subject: 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das08_cs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/staging/comedi/drivers/das08_cs.c') 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 -#include #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); } -- cgit v1.2.3-59-g8ed1b