Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0480bcb9 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2eb226dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment