[Originally posted 2013-06-20. Reposting to new driverdev-devel list.]
On 2013/06/19 11:24 PM, H Hartley Sweeten wrote:
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 <[email protected]> Cc: Ian Abbott <[email protected]> Cc: Greg Kroah-Hartman <[email protected]>
Looks good. Reviewed-by: Ian Abbott <[email protected]> -- -=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
