staging: unisys: fix CamelCase global variables in file.c
authorBenjamin Romer <benjamin.romer@unisys.com>
Fri, 5 Dec 2014 22:09:17 +0000 (17:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Jan 2015 01:32:34 +0000 (17:32 -0800)
Fix CamelCase names:

Cdev => file_cdev
PControlVm_channel => file_controlvm_channel
MajorDev => majordev
Registered => registered

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/file.c

index cb5bcb96d7fc87a246d07dadbea7ef6f1ee8f331..f4d01ed5219c85800788efd3e695942b3ce5d8e1 100644 (file)
 
 #define CURRENT_FILE_PC VISOR_CHIPSET_PC_file_c
 
-static struct cdev Cdev;
-static VISORCHANNEL **PControlVm_channel;
-static dev_t MajorDev = -1; /**< indicates major num for device */
-static BOOL Registered = FALSE;
+static struct cdev file_cdev;
+static VISORCHANNEL **file_controlvm_channel;
+static dev_t majordev = -1; /**< indicates major num for device */
+static BOOL registered = FALSE;
 
 static int visorchipset_open(struct inode *inode, struct file *file);
 static int visorchipset_release(struct inode *inode, struct file *file);
@@ -61,50 +61,50 @@ int visorchipset_file_init(dev_t major_dev, VISORCHANNEL **controlvm_channel)
 {
        int rc = 0;
 
-       PControlVm_channel = controlvm_channel;
-       MajorDev = major_dev;
-       cdev_init(&Cdev, &visorchipset_fops);
-       Cdev.owner = THIS_MODULE;
-       if (MAJOR(MajorDev) == 0) {
+       file_controlvm_channel = controlvm_channel;
+       majordev = major_dev;
+       cdev_init(&file_cdev, &visorchipset_fops);
+       file_cdev.owner = THIS_MODULE;
+       if (MAJOR(majordev) == 0) {
                /* dynamic major device number registration required */
-               if (alloc_chrdev_region(&MajorDev, 0, 1, MYDRVNAME) < 0) {
+               if (alloc_chrdev_region(&majordev, 0, 1, MYDRVNAME) < 0) {
                        ERRDRV("Unable to allocate+register char device %s",
                               MYDRVNAME);
                        return -1;
                }
-               Registered = TRUE;
-               INFODRV("New major number %d registered\n", MAJOR(MajorDev));
+               registered = TRUE;
+               INFODRV("New major number %d registered\n", MAJOR(majordev));
        } else {
                /* static major device number registration required */
-               if (register_chrdev_region(MajorDev, 1, MYDRVNAME) < 0) {
+               if (register_chrdev_region(majordev, 1, MYDRVNAME) < 0) {
                        ERRDRV("Unable to register char device %s", MYDRVNAME);
                        return -1;
                }
-               Registered = TRUE;
-               INFODRV("Static major number %d registered\n", MAJOR(MajorDev));
+               registered = TRUE;
+               INFODRV("Static major number %d registered\n", MAJOR(majordev));
        }
-       rc = cdev_add(&Cdev, MKDEV(MAJOR(MajorDev), 0), 1);
+       rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1);
        if (rc  < 0) {
                ERRDRV("failed to create char device: (status=%d)\n", rc);
                return -1;
        }
        INFODRV("Registered char device for %s (major=%d)",
-               MYDRVNAME, MAJOR(MajorDev));
+               MYDRVNAME, MAJOR(majordev));
        return 0;
 }
 
 void
 visorchipset_file_cleanup(void)
 {
-       if (Cdev.ops != NULL)
-               cdev_del(&Cdev);
-       Cdev.ops = NULL;
-       if (Registered) {
-               if (MAJOR(MajorDev) >= 0) {
-                       unregister_chrdev_region(MajorDev, 1);
-                       MajorDev = MKDEV(0, 0);
+       if (file_cdev.ops != NULL)
+               cdev_del(&file_cdev);
+       file_cdev.ops = NULL;
+       if (registered) {
+               if (MAJOR(majordev) >= 0) {
+                       unregister_chrdev_region(majordev, 1);
+                       majordev = MKDEV(0, 0);
                }
-               Registered = FALSE;
+               registered = FALSE;
        }
 }
 
@@ -148,11 +148,11 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
        switch (offset) {
        case VISORCHIPSET_MMAP_CONTROLCHANOFFSET:
                vma->vm_flags |= VM_IO;
-               if (*PControlVm_channel == NULL) {
+               if (*file_controlvm_channel == NULL) {
                        ERRDRV("%s no controlvm channel yet", __func__);
                        return -ENXIO;
                }
-               visorchannel_read(*PControlVm_channel,
+               visorchannel_read(*file_controlvm_channel,
                        offsetof(struct spar_controlvm_channel_protocol,
                                 gp_control_channel),
                        &addr, sizeof(addr));