staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 21:21:39 +0000 (14:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:25:53 +0000 (16:25 -0700)
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt9812.c

index 316843d5d6b4443be332505312147a3e9f6ddfc6..1fda98cc6ad884caab81dc8d06e67e4094fdfade 100644 (file)
@@ -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;