From: H Hartley Sweeten Date: Tue, 14 May 2013 21:21:39 +0000 (-0700) Subject: staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812 X-Git-Tag: firefly_0821_release~176^2~5845^2~633 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98c83cfac3a6c410497ac16a88e1424e0a57e265;p=firefly-linux-kernel-4.4.55.git staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812 Because of the usb (*probe) and comedi (*attach) disconnect, the struct slot_dt9812 is used to pass the device data between the usb_driver and the comedi_driver. The variable 'comedi' in this struct is used during the comedi (*attach) to indicate if a slot is currently being used. For aesthetic reasons, rename the variable to 'devpriv' since that is what is actually saved in the pointer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 316843d5d6b4..1fda98cc6ad8 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c @@ -288,7 +288,7 @@ struct slot_dt9812 { struct semaphore mutex; u32 serial; struct usb_dt9812 *usb; - struct dt9812_private *comedi; + struct dt9812_private *devpriv; }; static struct slot_dt9812 dt9812[DT9812_NUM_SLOTS]; @@ -863,7 +863,7 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct slot_dt9812 *first = NULL; struct slot_dt9812 *best = NULL; for (i = 0; i < DT9812_NUM_SLOTS; i++) { - if (!first && !dt9812[i].comedi) { + if (!first && !dt9812[i].devpriv) { /* First free slot from comedi side */ first = &dt9812[i]; } @@ -878,7 +878,7 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it) best = first; if (best) { down(&best->mutex); - best->comedi = devpriv; + best->devpriv = devpriv; best->serial = devpriv->serial; devpriv->slot = best; up(&best->mutex); @@ -1111,7 +1111,7 @@ static int __init usb_dt9812_init(void) sema_init(&dt9812[i].mutex, 1); dt9812[i].serial = 0; dt9812[i].usb = NULL; - dt9812[i].comedi = NULL; + dt9812[i].devpriv = NULL; } dt9812[12].serial = 0x0;