From: H Hartley Sweeten Date: Thu, 20 Dec 2012 00:27:02 +0000 (-0700) Subject: staging: comedi: store the 'index' for each subdevice X-Git-Tag: v3.9-rc1~127^2~513 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90a35c15c5d7d5c6254772d2752975dda185710c;p=pandora-kernel.git staging: comedi: store the 'index' for each subdevice Store the 'index' for each comedi_subdevice when they are initially allocated by comedi_alloc_subdevice(). This allows removing the pointer math in comedi_fops.c which is used to figure out the index that user space uses to access the individual subdevices. Fix the ni_mio_common driver so it also uses the 'index' instead of doing the pointer math. Also, remove a couple unused macros in the pcmda12, pcmmio, and pcmuio drivers which also do the pointer math to figure out the index. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed