staging: unisys: remove global dev_t
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 24 Mar 2015 15:17:29 +0000 (20:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 23:01:23 +0000 (00:01 +0100)
the global variable majordev is no longer required, as it is not being
used anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.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 257cfdd841d491a6e586a62f64e05826dd682ea0..890869ad36f4c235d64cddd0303e2c28e7315abe 100644 (file)
@@ -30,7 +30,6 @@
 
 static struct cdev file_cdev;
 static struct visorchannel **file_controlvm_channel;
-static dev_t majordev = -1; /**< indicates major num for device */
 
 static int visorchipset_open(struct inode *inode, struct file *file);
 static int visorchipset_release(struct inode *inode, struct file *file);
@@ -54,7 +53,6 @@ visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel)
        int rc = 0;
 
        file_controlvm_channel = controlvm_channel;
-       majordev = major_dev;
        cdev_init(&file_cdev, &visorchipset_fops);
        file_cdev.owner = THIS_MODULE;
        if (MAJOR(major_dev) == 0) {
@@ -80,7 +78,6 @@ visorchipset_file_cleanup(dev_t major_dev)
        file_cdev.ops = NULL;
        if (MAJOR(major_dev) >= 0) {
                unregister_chrdev_region(major_dev, 1);
-               majordev = MKDEV(0, 0);
        }
 }