silicom-bypass: Remove device_open/close()
authorDavid Howells <dhowells@redhat.com>
Thu, 4 Apr 2013 19:36:00 +0000 (20:36 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 9 Apr 2013 18:16:40 +0000 (14:16 -0400)
Remove device_open/close() functions as they don't really do anything and
remove Device_Open as it isn't counted atomically and the value isn't used.

Signed-off-by: David Howells <dhowells@redhat.com>
drivers/staging/silicom/bpctl_mod.c

index 2cfa800e248cfd062a474201f401c7cb322b28d9..3117559c041b25111380276d66653a2732371e88 100644 (file)
@@ -35,7 +35,6 @@
 #define BP_MOD_DESCR "Silicom Bypass-SD Control driver"
 #define BP_SYNC_FLAG 1
 
-static int Device_Open = 0;
 static int major_num = 0;
 
 MODULE_AUTHOR("Anna Lukin, annal@silicom.co.il");
@@ -289,27 +288,6 @@ static struct notifier_block bp_notifier_block = {
        .notifier_call = bp_device_event,
 };
 
-static int device_open(struct inode *inode, struct file *file)
-{
-#ifdef DEBUG
-       printk("device_open(%p)\n", file);
-#endif
-       Device_Open++;
-/*
-* Initialize the message
-*/
-       return SUCCESS;
-}
-
-static int device_release(struct inode *inode, struct file *file)
-{
-#ifdef DEBUG
-       printk("device_release(%p,%p)\n", inode, file);
-#endif
-       Device_Open--;
-       return SUCCESS;
-}
-
 int is_bypass_fn(bpctl_dev_t *pbpctl_dev);
 int wdt_time_left(bpctl_dev_t *pbpctl_dev);
 
@@ -5806,8 +5784,6 @@ static long device_ioctl(struct file *file,       /* see include/linux/fs.h */
 static const struct file_operations Fops = {
        .owner = THIS_MODULE,
        .unlocked_ioctl = device_ioctl,
-       .open = device_open,
-       .release = device_release,      /* a.k.a. close */
 };
 
 #ifndef PCI_DEVICE