diff options
author | David Howells <dhowells@redhat.com> | 2013-04-04 15:36:00 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:16:40 -0400 |
commit | 7294b0bb694c4376cad819bb97f2796626f50551 (patch) | |
tree | b6c37ae9b9ec7fcb9bb82ea86c2b0b23dbbdf453 | |
parent | 80e928f7ebb958f4d79d4099d1c5c0a015a23b93 (diff) |
silicom-bypass: Remove device_open/close()
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>
-rw-r--r-- | drivers/staging/silicom/bpctl_mod.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 2cfa800e248c..3117559c041b 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #define BP_MOD_DESCR "Silicom Bypass-SD Control driver" | 35 | #define BP_MOD_DESCR "Silicom Bypass-SD Control driver" |
36 | #define BP_SYNC_FLAG 1 | 36 | #define BP_SYNC_FLAG 1 |
37 | 37 | ||
38 | static int Device_Open = 0; | ||
39 | static int major_num = 0; | 38 | static int major_num = 0; |
40 | 39 | ||
41 | MODULE_AUTHOR("Anna Lukin, annal@silicom.co.il"); | 40 | MODULE_AUTHOR("Anna Lukin, annal@silicom.co.il"); |
@@ -289,27 +288,6 @@ static struct notifier_block bp_notifier_block = { | |||
289 | .notifier_call = bp_device_event, | 288 | .notifier_call = bp_device_event, |
290 | }; | 289 | }; |
291 | 290 | ||
292 | static int device_open(struct inode *inode, struct file *file) | ||
293 | { | ||
294 | #ifdef DEBUG | ||
295 | printk("device_open(%p)\n", file); | ||
296 | #endif | ||
297 | Device_Open++; | ||
298 | /* | ||
299 | * Initialize the message | ||
300 | */ | ||
301 | return SUCCESS; | ||
302 | } | ||
303 | |||
304 | static int device_release(struct inode *inode, struct file *file) | ||
305 | { | ||
306 | #ifdef DEBUG | ||
307 | printk("device_release(%p,%p)\n", inode, file); | ||
308 | #endif | ||
309 | Device_Open--; | ||
310 | return SUCCESS; | ||
311 | } | ||
312 | |||
313 | int is_bypass_fn(bpctl_dev_t *pbpctl_dev); | 291 | int is_bypass_fn(bpctl_dev_t *pbpctl_dev); |
314 | int wdt_time_left(bpctl_dev_t *pbpctl_dev); | 292 | int wdt_time_left(bpctl_dev_t *pbpctl_dev); |
315 | 293 | ||
@@ -5806,8 +5784,6 @@ static long device_ioctl(struct file *file, /* see include/linux/fs.h */ | |||
5806 | static const struct file_operations Fops = { | 5784 | static const struct file_operations Fops = { |
5807 | .owner = THIS_MODULE, | 5785 | .owner = THIS_MODULE, |
5808 | .unlocked_ioctl = device_ioctl, | 5786 | .unlocked_ioctl = device_ioctl, |
5809 | .open = device_open, | ||
5810 | .release = device_release, /* a.k.a. close */ | ||
5811 | }; | 5787 | }; |
5812 | 5788 | ||
5813 | #ifndef PCI_DEVICE | 5789 | #ifndef PCI_DEVICE |