diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-19 15:24:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:46:56 -0700 |
commit | 0480bcb9fb5e279df9d39f21bb0e87ab15b5092a (patch) | |
tree | 46fc47b3121ee4355f780bfcf570f4e7c02d5ad9 /tools/perf/scripts/python/netdev-times.py | |
parent | 2eb226dcedd0257ae0d712f0c0c0c35de24465ea (diff) |
staging: comedi: have comedi_set_spriv() allocate the memory
As suggested by Ian Abbott, comedi_set_spriv() can only be used to
set the subdevice->private pointer to something that can be kfree()'d.
Rename the function to comedi_alloc_spriv() and have it kzalloc() the
memory as well as set the private pointer. This saves a function call
in the drivers and avoids the possibility of incorrectly calling
comedi_set_spriv() for some pointer that is not meant to be kfree()'d.
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 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions