aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 18:16:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:32 -0400
commitd9dda78bad879595d8c4220a067fc029d6484a16 (patch)
tree376c47ed566b719009e753e917104b150a639b11 /drivers/usb
parent8510e30b46cd5467b2f930bef68a276dbc2c7d7c (diff)
procfs: new helper - PDE_DATA(inode)
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/at91_udc.c2
-rw-r--r--drivers/usb/gadget/lpc32xx_udc.c2
-rw-r--r--drivers/usb/gadget/rndis.c4
-rw-r--r--drivers/usb/host/isp1362-hcd.c2
-rw-r--r--drivers/usb/host/sl811-hcd.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 45dd2929a671..88966e0508a5 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -221,7 +221,7 @@ static int proc_udc_show(struct seq_file *s, void *unused)
221 221
222static int proc_udc_open(struct inode *inode, struct file *file) 222static int proc_udc_open(struct inode *inode, struct file *file)
223{ 223{
224 return single_open(file, proc_udc_show, PDE(inode)->data); 224 return single_open(file, proc_udc_show, PDE_DATA(inode));
225} 225}
226 226
227static const struct file_operations proc_ops = { 227static const struct file_operations proc_ops = {
diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c
index aa04089d6899..1049d3745d7a 100644
--- a/drivers/usb/gadget/lpc32xx_udc.c
+++ b/drivers/usb/gadget/lpc32xx_udc.c
@@ -565,7 +565,7 @@ static int proc_udc_show(struct seq_file *s, void *unused)
565 565
566static int proc_udc_open(struct inode *inode, struct file *file) 566static int proc_udc_open(struct inode *inode, struct file *file)
567{ 567{
568 return single_open(file, proc_udc_show, PDE(inode)->data); 568 return single_open(file, proc_udc_show, PDE_DATA(inode));
569} 569}
570 570
571static const struct file_operations proc_ops = { 571static const struct file_operations proc_ops = {
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index d9297eebbf73..1e4cfb05f70b 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -1065,7 +1065,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, 1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1066 size_t count, loff_t *ppos) 1066 size_t count, loff_t *ppos)
1067{ 1067{
1068 rndis_params *p = PDE(file_inode(file))->data; 1068 rndis_params *p = PDE_DATA(file_inode(file));
1069 u32 speed = 0; 1069 u32 speed = 0;
1070 int i, fl_speed = 0; 1070 int i, fl_speed = 0;
1071 1071
@@ -1109,7 +1109,7 @@ static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1109 1109
1110static int rndis_proc_open(struct inode *inode, struct file *file) 1110static int rndis_proc_open(struct inode *inode, struct file *file)
1111{ 1111{
1112 return single_open(file, rndis_proc_show, PDE(inode)->data); 1112 return single_open(file, rndis_proc_show, PDE_DATA(inode));
1113} 1113}
1114 1114
1115static const struct file_operations rndis_proc_fops = { 1115static const struct file_operations rndis_proc_fops = {
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 9137caadb1c8..b04e8ece4d35 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2175,7 +2175,7 @@ static int proc_isp1362_show(struct seq_file *s, void *unused)
2175 2175
2176static int proc_isp1362_open(struct inode *inode, struct file *file) 2176static int proc_isp1362_open(struct inode *inode, struct file *file)
2177{ 2177{
2178 return single_open(file, proc_isp1362_show, PDE(inode)->data); 2178 return single_open(file, proc_isp1362_show, PDE_DATA(inode));
2179} 2179}
2180 2180
2181static const struct file_operations proc_ops = { 2181static const struct file_operations proc_ops = {
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index d62f0404baaa..313d0bbfff29 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1494,7 +1494,7 @@ static int proc_sl811h_show(struct seq_file *s, void *unused)
1494 1494
1495static int proc_sl811h_open(struct inode *inode, struct file *file) 1495static int proc_sl811h_open(struct inode *inode, struct file *file)
1496{ 1496{
1497 return single_open(file, proc_sl811h_show, PDE(inode)->data); 1497 return single_open(file, proc_sl811h_show, PDE_DATA(inode));
1498} 1498}
1499 1499
1500static const struct file_operations proc_ops = { 1500static const struct file_operations proc_ops = {