diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-24 16:55:44 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 14:04:59 -0700 |
commit | 0bdab509bf9c6d838dc0a3b1d68bbf841fc20b5a (patch) | |
tree | 0cff143ffb15d26181eb5f2d04f95d592cb63106 /drivers/staging/comedi/drivers/adl_pci9111.c | |
parent | 54db996e6dab51571718e8e97c26fdc695e254ac (diff) |
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/adl_pci9111.c')
-rw-r--r-- | drivers/staging/comedi/drivers/adl_pci9111.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index af51c7460048..cf93e416dd29 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -855,10 +855,9 @@ static int pci9111_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev_private = kzalloc(sizeof(*dev_private), GFP_KERNEL); + dev_private = comedi_alloc_devpriv(dev, sizeof(*dev_private)); if (!dev_private) return -ENOMEM; - dev->private = dev_private; ret = comedi_pci_enable(dev); if (ret) |