From: H Hartley Sweeten Date: Wed, 19 Jun 2013 22:24:36 +0000 (-0700) Subject: staging: comedi: have comedi_set_spriv() allocate the memory X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0480bcb9fb5e279df9d39f21bb0e87ab15b5092a;p=pandora-kernel.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed