aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
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/isdn
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/isdn')
-rw-r--r--drivers/isdn/gigaset/capi.c2
-rw-r--r--drivers/isdn/hardware/avm/b1.c2
-rw-r--r--drivers/isdn/hardware/avm/b1dma.c2
-rw-r--r--drivers/isdn/hardware/avm/c4.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c12
-rw-r--r--drivers/isdn/hysdn/hycapi.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c4
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c8
8 files changed, 17 insertions, 17 deletions
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 03a0a01a4054..3286903a95d2 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -2334,7 +2334,7 @@ static int gigaset_proc_show(struct seq_file *m, void *v)
2334 2334
2335static int gigaset_proc_open(struct inode *inode, struct file *file) 2335static int gigaset_proc_open(struct inode *inode, struct file *file)
2336{ 2336{
2337 return single_open(file, gigaset_proc_show, PDE(inode)->data); 2337 return single_open(file, gigaset_proc_show, PDE_DATA(inode));
2338} 2338}
2339 2339
2340static const struct file_operations gigaset_proc_fops = { 2340static const struct file_operations gigaset_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
index 821f7ac33b37..4d9b195547c5 100644
--- a/drivers/isdn/hardware/avm/b1.c
+++ b/drivers/isdn/hardware/avm/b1.c
@@ -702,7 +702,7 @@ static int b1ctl_proc_show(struct seq_file *m, void *v)
702 702
703static int b1ctl_proc_open(struct inode *inode, struct file *file) 703static int b1ctl_proc_open(struct inode *inode, struct file *file)
704{ 704{
705 return single_open(file, b1ctl_proc_show, PDE(inode)->data); 705 return single_open(file, b1ctl_proc_show, PDE_DATA(inode));
706} 706}
707 707
708const struct file_operations b1ctl_proc_fops = { 708const struct file_operations b1ctl_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index 0896aa86fc08..19b113faeb7b 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -944,7 +944,7 @@ static int b1dmactl_proc_show(struct seq_file *m, void *v)
944 944
945static int b1dmactl_proc_open(struct inode *inode, struct file *file) 945static int b1dmactl_proc_open(struct inode *inode, struct file *file)
946{ 946{
947 return single_open(file, b1dmactl_proc_show, PDE(inode)->data); 947 return single_open(file, b1dmactl_proc_show, PDE_DATA(inode));
948} 948}
949 949
950const struct file_operations b1dmactl_proc_fops = { 950const struct file_operations b1dmactl_proc_fops = {
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index 1d7fc44e3eef..5d00d72fe482 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -1129,7 +1129,7 @@ static int c4_proc_show(struct seq_file *m, void *v)
1129 1129
1130static int c4_proc_open(struct inode *inode, struct file *file) 1130static int c4_proc_open(struct inode *inode, struct file *file)
1131{ 1131{
1132 return single_open(file, c4_proc_show, PDE(inode)->data); 1132 return single_open(file, c4_proc_show, PDE_DATA(inode));
1133} 1133}
1134 1134
1135static const struct file_operations c4_proc_fops = { 1135static const struct file_operations c4_proc_fops = {
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index 3a4165c61196..56ce98a4e248 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -145,7 +145,7 @@ void remove_divas_proc(void)
145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer, 145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
146 size_t count, loff_t *pos) 146 size_t count, loff_t *pos)
147{ 147{
148 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 148 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
150 150
151 if ((count == 1) || (count == 2)) { 151 if ((count == 1) || (count == 2)) {
@@ -172,7 +172,7 @@ static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer, 172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer,
173 size_t count, loff_t *pos) 173 size_t count, loff_t *pos)
174{ 174{
175 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 175 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
177 177
178 if ((count == 1) || (count == 2)) { 178 if ((count == 1) || (count == 2)) {
@@ -210,7 +210,7 @@ static int d_l1_down_proc_show(struct seq_file *m, void *v)
210 210
211static int d_l1_down_proc_open(struct inode *inode, struct file *file) 211static int d_l1_down_proc_open(struct inode *inode, struct file *file)
212{ 212{
213 return single_open(file, d_l1_down_proc_show, PDE(inode)->data); 213 return single_open(file, d_l1_down_proc_show, PDE_DATA(inode));
214} 214}
215 215
216static const struct file_operations d_l1_down_proc_fops = { 216static const struct file_operations d_l1_down_proc_fops = {
@@ -236,7 +236,7 @@ static int grp_opt_proc_show(struct seq_file *m, void *v)
236 236
237static int grp_opt_proc_open(struct inode *inode, struct file *file) 237static int grp_opt_proc_open(struct inode *inode, struct file *file)
238{ 238{
239 return single_open(file, grp_opt_proc_show, PDE(inode)->data); 239 return single_open(file, grp_opt_proc_show, PDE_DATA(inode));
240} 240}
241 241
242static const struct file_operations grp_opt_proc_fops = { 242static const struct file_operations grp_opt_proc_fops = {
@@ -251,7 +251,7 @@ static const struct file_operations grp_opt_proc_fops = {
251static ssize_t info_proc_write(struct file *file, const char __user *buffer, 251static ssize_t info_proc_write(struct file *file, const char __user *buffer,
252 size_t count, loff_t *pos) 252 size_t count, loff_t *pos)
253{ 253{
254 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data; 254 diva_os_xdi_adapter_t *a = PDE_DATA(file_inode(file));
255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
256 char c[4]; 256 char c[4];
257 257
@@ -335,7 +335,7 @@ static int info_proc_show(struct seq_file *m, void *v)
335 335
336static int info_proc_open(struct inode *inode, struct file *file) 336static int info_proc_open(struct inode *inode, struct file *file)
337{ 337{
338 return single_open(file, info_proc_show, PDE(inode)->data); 338 return single_open(file, info_proc_show, PDE_DATA(inode));
339} 339}
340 340
341static const struct file_operations info_proc_fops = { 341static const struct file_operations info_proc_fops = {
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index 931f916c9c23..00aad10507d8 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -469,7 +469,7 @@ static int hycapi_proc_show(struct seq_file *m, void *v)
469 469
470static int hycapi_proc_open(struct inode *inode, struct file *file) 470static int hycapi_proc_open(struct inode *inode, struct file *file)
471{ 471{
472 return single_open(file, hycapi_proc_show, PDE(inode)->data); 472 return single_open(file, hycapi_proc_show, PDE_DATA(inode));
473} 473}
474 474
475static const struct file_operations hycapi_proc_fops = { 475static const struct file_operations hycapi_proc_fops = {
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index dc88bcb25029..73079213ec94 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -234,7 +234,7 @@ hysdn_conf_open(struct inode *ino, struct file *filep)
234 234
235 /* now search the addressed card */ 235 /* now search the addressed card */
236 mutex_lock(&hysdn_conf_mutex); 236 mutex_lock(&hysdn_conf_mutex);
237 card = PDE(ino)->data; 237 card = PDE_DATA(ino);
238 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) 238 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL))
239 hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x", 239 hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x",
240 filep->f_cred->fsuid, filep->f_cred->fsgid, 240 filep->f_cred->fsuid, filep->f_cred->fsgid,
@@ -308,7 +308,7 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
308 int retval = 0; 308 int retval = 0;
309 309
310 mutex_lock(&hysdn_conf_mutex); 310 mutex_lock(&hysdn_conf_mutex);
311 card = PDE(ino)->data; 311 card = PDE_DATA(ino);
312 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL)) 312 if (card->debug_flags & (LOG_PROC_OPEN | LOG_PROC_ALL))
313 hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x", 313 hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x",
314 filep->f_cred->fsuid, filep->f_cred->fsgid, 314 filep->f_cred->fsuid, filep->f_cred->fsgid,
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 22f0e4ef1fb1..b61e8d5e84ad 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -173,7 +173,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
173{ 173{
174 struct log_data *inf; 174 struct log_data *inf;
175 int len; 175 int len;
176 hysdn_card *card = PDE(file_inode(file))->data; 176 hysdn_card *card = PDE_DATA(file_inode(file));
177 177
178 if (!*((struct log_data **) file->private_data)) { 178 if (!*((struct log_data **) file->private_data)) {
179 struct procdata *pd = card->proclog; 179 struct procdata *pd = card->proclog;
@@ -202,7 +202,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
202static int 202static int
203hysdn_log_open(struct inode *ino, struct file *filep) 203hysdn_log_open(struct inode *ino, struct file *filep)
204{ 204{
205 hysdn_card *card = PDE(ino)->data; 205 hysdn_card *card = PDE_DATA(ino);
206 206
207 mutex_lock(&hysdn_log_mutex); 207 mutex_lock(&hysdn_log_mutex);
208 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) { 208 if ((filep->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) {
@@ -255,7 +255,7 @@ hysdn_log_close(struct inode *ino, struct file *filep)
255 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */ 255 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */
256 else { 256 else {
257 /* no info available -> search card */ 257 /* no info available -> search card */
258 card = PDE(file_inode(filep))->data; 258 card = PDE_DATA(file_inode(filep));
259 pd = card->proclog; /* pointer to procfs log */ 259 pd = card->proclog; /* pointer to procfs log */
260 } 260 }
261 if (pd) 261 if (pd)
@@ -286,7 +286,7 @@ static unsigned int
286hysdn_log_poll(struct file *file, poll_table *wait) 286hysdn_log_poll(struct file *file, poll_table *wait)
287{ 287{
288 unsigned int mask = 0; 288 unsigned int mask = 0;
289 hysdn_card *card = PDE(file_inode(file))->data; 289 hysdn_card *card = PDE_DATA(file_inode(file));
290 struct procdata *pd = card->proclog; 290 struct procdata *pd = card->proclog;
291 291
292 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) 292 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE)