aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-05 18:30:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-05 18:30:34 -0400
commit5d32c88f0b94061b3af2e3ade92422407282eb12 (patch)
tree2e1f81aa47b2cf59625c8fba17199617e33802e6 /drivers/usb
parent43f63c8711ce02226b7bbdafeba7b8031faf3fb4 (diff)
parentdac23b0d0513916498d40412818bd2c581b365f7 (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/inode.c10
-rw-r--r--drivers/usb/host/ehci-dbg.c9
2 files changed, 2 insertions, 17 deletions
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index cefa0c8b5b6..d2b9af59cba 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -428,18 +428,10 @@ static loff_t default_file_lseek (struct file *file, loff_t offset, int orig)
428 return retval; 428 return retval;
429} 429}
430 430
431static int default_open (struct inode *inode, struct file *file)
432{
433 if (inode->i_private)
434 file->private_data = inode->i_private;
435
436 return 0;
437}
438
439static const struct file_operations default_file_operations = { 431static const struct file_operations default_file_operations = {
440 .read = default_read_file, 432 .read = default_read_file,
441 .write = default_write_file, 433 .write = default_write_file,
442 .open = default_open, 434 .open = simple_open,
443 .llseek = default_file_lseek, 435 .llseek = default_file_lseek,
444}; 436};
445 437
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index fd9109d7eb0..680e1a31fb8 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -352,7 +352,6 @@ static int debug_async_open(struct inode *, struct file *);
352static int debug_periodic_open(struct inode *, struct file *); 352static int debug_periodic_open(struct inode *, struct file *);
353static int debug_registers_open(struct inode *, struct file *); 353static int debug_registers_open(struct inode *, struct file *);
354static int debug_async_open(struct inode *, struct file *); 354static int debug_async_open(struct inode *, struct file *);
355static int debug_lpm_open(struct inode *, struct file *);
356static ssize_t debug_lpm_read(struct file *file, char __user *user_buf, 355static ssize_t debug_lpm_read(struct file *file, char __user *user_buf,
357 size_t count, loff_t *ppos); 356 size_t count, loff_t *ppos);
358static ssize_t debug_lpm_write(struct file *file, const char __user *buffer, 357static ssize_t debug_lpm_write(struct file *file, const char __user *buffer,
@@ -385,7 +384,7 @@ static const struct file_operations debug_registers_fops = {
385}; 384};
386static const struct file_operations debug_lpm_fops = { 385static const struct file_operations debug_lpm_fops = {
387 .owner = THIS_MODULE, 386 .owner = THIS_MODULE,
388 .open = debug_lpm_open, 387 .open = simple_open,
389 .read = debug_lpm_read, 388 .read = debug_lpm_read,
390 .write = debug_lpm_write, 389 .write = debug_lpm_write,
391 .release = debug_lpm_close, 390 .release = debug_lpm_close,
@@ -970,12 +969,6 @@ static int debug_registers_open(struct inode *inode, struct file *file)
970 return file->private_data ? 0 : -ENOMEM; 969 return file->private_data ? 0 : -ENOMEM;
971} 970}
972 971
973static int debug_lpm_open(struct inode *inode, struct file *file)
974{
975 file->private_data = inode->i_private;
976 return 0;
977}
978
979static int debug_lpm_close(struct inode *inode, struct file *file) 972static int debug_lpm_close(struct inode *inode, struct file *file)
980{ 973{
981 return 0; 974 return 0;