diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-11 12:39:29 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 01:24:30 -0400 |
commit | 2cd1f0ddbb5667f61e69089964209e8f716e9009 (patch) | |
tree | 03903b37054967d333cbefad3804c0b137ebe015 | |
parent | a2d03aac5197e708711c65718fbcadc91b5b0b06 (diff) |
isdn: replace ->proc_fops with ->proc_show
And switch to proc_create_single_data.
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/isdn/capi/kcapi.c | 3 | ||||
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 16 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/avmcard.h | 4 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/b1.c | 17 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/b1dma.c | 17 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/b1isa.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/b1pci.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/b1pcmcia.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/c4.c | 15 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/t1isa.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/avm/t1pci.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/capimain.c | 15 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hycapi.c | 15 | ||||
-rw-r--r-- | include/linux/isdn/capilli.h | 2 | ||||
-rw-r--r-- | net/bluetooth/cmtp/capi.c | 14 |
15 files changed, 20 insertions, 110 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 46c189ad8d94..0ff517d3c98f 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -534,7 +534,8 @@ int attach_capi_ctr(struct capi_ctr *ctr) | |||
534 | init_waitqueue_head(&ctr->state_wait_queue); | 534 | init_waitqueue_head(&ctr->state_wait_queue); |
535 | 535 | ||
536 | sprintf(ctr->procfn, "capi/controllers/%d", ctr->cnr); | 536 | sprintf(ctr->procfn, "capi/controllers/%d", ctr->cnr); |
537 | ctr->procent = proc_create_data(ctr->procfn, 0, NULL, ctr->proc_fops, ctr); | 537 | ctr->procent = proc_create_single_data(ctr->procfn, 0, NULL, |
538 | ctr->proc_show, ctr); | ||
538 | 539 | ||
539 | ncontrollers++; | 540 | ncontrollers++; |
540 | 541 | ||
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index ccec7778cad2..dac5cd35e901 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -2437,19 +2437,6 @@ static int gigaset_proc_show(struct seq_file *m, void *v) | |||
2437 | return 0; | 2437 | return 0; |
2438 | } | 2438 | } |
2439 | 2439 | ||
2440 | static int gigaset_proc_open(struct inode *inode, struct file *file) | ||
2441 | { | ||
2442 | return single_open(file, gigaset_proc_show, PDE_DATA(inode)); | ||
2443 | } | ||
2444 | |||
2445 | static const struct file_operations gigaset_proc_fops = { | ||
2446 | .owner = THIS_MODULE, | ||
2447 | .open = gigaset_proc_open, | ||
2448 | .read = seq_read, | ||
2449 | .llseek = seq_lseek, | ||
2450 | .release = single_release, | ||
2451 | }; | ||
2452 | |||
2453 | /** | 2440 | /** |
2454 | * gigaset_isdn_regdev() - register device to LL | 2441 | * gigaset_isdn_regdev() - register device to LL |
2455 | * @cs: device descriptor structure. | 2442 | * @cs: device descriptor structure. |
@@ -2478,8 +2465,7 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) | |||
2478 | iif->ctr.register_appl = gigaset_register_appl; | 2465 | iif->ctr.register_appl = gigaset_register_appl; |
2479 | iif->ctr.release_appl = gigaset_release_appl; | 2466 | iif->ctr.release_appl = gigaset_release_appl; |
2480 | iif->ctr.send_message = gigaset_send_message; | 2467 | iif->ctr.send_message = gigaset_send_message; |
2481 | iif->ctr.procinfo = gigaset_procinfo; | 2468 | iif->ctr.proc_show = gigaset_proc_show, |
2482 | iif->ctr.proc_fops = &gigaset_proc_fops; | ||
2483 | INIT_LIST_HEAD(&iif->appls); | 2469 | INIT_LIST_HEAD(&iif->appls); |
2484 | skb_queue_head_init(&iif->sendqueue); | 2470 | skb_queue_head_init(&iif->sendqueue); |
2485 | atomic_set(&iif->sendqlen, 0); | 2471 | atomic_set(&iif->sendqlen, 0); |
diff --git a/drivers/isdn/hardware/avm/avmcard.h b/drivers/isdn/hardware/avm/avmcard.h index c95712dbfa9f..cdfa89c71997 100644 --- a/drivers/isdn/hardware/avm/avmcard.h +++ b/drivers/isdn/hardware/avm/avmcard.h | |||
@@ -556,7 +556,7 @@ u16 b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); | |||
556 | void b1_parse_version(avmctrl_info *card); | 556 | void b1_parse_version(avmctrl_info *card); |
557 | irqreturn_t b1_interrupt(int interrupt, void *devptr); | 557 | irqreturn_t b1_interrupt(int interrupt, void *devptr); |
558 | 558 | ||
559 | extern const struct file_operations b1ctl_proc_fops; | 559 | int b1_proc_show(struct seq_file *m, void *v); |
560 | 560 | ||
561 | avmcard_dmainfo *avmcard_dma_alloc(char *name, struct pci_dev *, | 561 | avmcard_dmainfo *avmcard_dma_alloc(char *name, struct pci_dev *, |
562 | long rsize, long ssize); | 562 | long rsize, long ssize); |
@@ -576,6 +576,6 @@ void b1dma_register_appl(struct capi_ctr *ctrl, | |||
576 | capi_register_params *rp); | 576 | capi_register_params *rp); |
577 | void b1dma_release_appl(struct capi_ctr *ctrl, u16 appl); | 577 | void b1dma_release_appl(struct capi_ctr *ctrl, u16 appl); |
578 | u16 b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); | 578 | u16 b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); |
579 | extern const struct file_operations b1dmactl_proc_fops; | 579 | int b1dma_proc_show(struct seq_file *m, void *v); |
580 | 580 | ||
581 | #endif /* _AVMCARD_H_ */ | 581 | #endif /* _AVMCARD_H_ */ |
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c index b1833d08a5fe..5ee5489d3f15 100644 --- a/drivers/isdn/hardware/avm/b1.c +++ b/drivers/isdn/hardware/avm/b1.c | |||
@@ -637,7 +637,7 @@ irqreturn_t b1_interrupt(int interrupt, void *devptr) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | /* ------------------------------------------------------------- */ | 639 | /* ------------------------------------------------------------- */ |
640 | static int b1ctl_proc_show(struct seq_file *m, void *v) | 640 | int b1_proc_show(struct seq_file *m, void *v) |
641 | { | 641 | { |
642 | struct capi_ctr *ctrl = m->private; | 642 | struct capi_ctr *ctrl = m->private; |
643 | avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); | 643 | avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); |
@@ -699,20 +699,7 @@ static int b1ctl_proc_show(struct seq_file *m, void *v) | |||
699 | 699 | ||
700 | return 0; | 700 | return 0; |
701 | } | 701 | } |
702 | 702 | EXPORT_SYMBOL(b1_proc_show); | |
703 | static int b1ctl_proc_open(struct inode *inode, struct file *file) | ||
704 | { | ||
705 | return single_open(file, b1ctl_proc_show, PDE_DATA(inode)); | ||
706 | } | ||
707 | |||
708 | const struct file_operations b1ctl_proc_fops = { | ||
709 | .owner = THIS_MODULE, | ||
710 | .open = b1ctl_proc_open, | ||
711 | .read = seq_read, | ||
712 | .llseek = seq_lseek, | ||
713 | .release = single_release, | ||
714 | }; | ||
715 | EXPORT_SYMBOL(b1ctl_proc_fops); | ||
716 | 703 | ||
717 | /* ------------------------------------------------------------- */ | 704 | /* ------------------------------------------------------------- */ |
718 | 705 | ||
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 9538a9e5e1a8..6a3dc9937ce5 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c | |||
@@ -858,7 +858,7 @@ u16 b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) | |||
858 | 858 | ||
859 | /* ------------------------------------------------------------- */ | 859 | /* ------------------------------------------------------------- */ |
860 | 860 | ||
861 | static int b1dmactl_proc_show(struct seq_file *m, void *v) | 861 | int b1dma_proc_show(struct seq_file *m, void *v) |
862 | { | 862 | { |
863 | struct capi_ctr *ctrl = m->private; | 863 | struct capi_ctr *ctrl = m->private; |
864 | avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); | 864 | avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); |
@@ -941,20 +941,7 @@ static int b1dmactl_proc_show(struct seq_file *m, void *v) | |||
941 | 941 | ||
942 | return 0; | 942 | return 0; |
943 | } | 943 | } |
944 | 944 | EXPORT_SYMBOL(b1dma_proc_show); | |
945 | static int b1dmactl_proc_open(struct inode *inode, struct file *file) | ||
946 | { | ||
947 | return single_open(file, b1dmactl_proc_show, PDE_DATA(inode)); | ||
948 | } | ||
949 | |||
950 | const struct file_operations b1dmactl_proc_fops = { | ||
951 | .owner = THIS_MODULE, | ||
952 | .open = b1dmactl_proc_open, | ||
953 | .read = seq_read, | ||
954 | .llseek = seq_lseek, | ||
955 | .release = single_release, | ||
956 | }; | ||
957 | EXPORT_SYMBOL(b1dmactl_proc_fops); | ||
958 | 945 | ||
959 | /* ------------------------------------------------------------- */ | 946 | /* ------------------------------------------------------------- */ |
960 | 947 | ||
diff --git a/drivers/isdn/hardware/avm/b1isa.c b/drivers/isdn/hardware/avm/b1isa.c index 54e871a47387..cdfea72e0ef6 100644 --- a/drivers/isdn/hardware/avm/b1isa.c +++ b/drivers/isdn/hardware/avm/b1isa.c | |||
@@ -121,7 +121,7 @@ static int b1isa_probe(struct pci_dev *pdev) | |||
121 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; | 121 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; |
122 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; | 122 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; |
123 | cinfo->capi_ctrl.procinfo = b1isa_procinfo; | 123 | cinfo->capi_ctrl.procinfo = b1isa_procinfo; |
124 | cinfo->capi_ctrl.proc_fops = &b1ctl_proc_fops; | 124 | cinfo->capi_ctrl.proc_show = b1_proc_show; |
125 | strcpy(cinfo->capi_ctrl.name, card->name); | 125 | strcpy(cinfo->capi_ctrl.name, card->name); |
126 | 126 | ||
127 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 127 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index ac4863c2ecbc..b76b57a82c02 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c | |||
@@ -112,7 +112,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev) | |||
112 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; | 112 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; |
113 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; | 113 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; |
114 | cinfo->capi_ctrl.procinfo = b1pci_procinfo; | 114 | cinfo->capi_ctrl.procinfo = b1pci_procinfo; |
115 | cinfo->capi_ctrl.proc_fops = &b1ctl_proc_fops; | 115 | cinfo->capi_ctrl.proc_show = b1_proc_show; |
116 | strcpy(cinfo->capi_ctrl.name, card->name); | 116 | strcpy(cinfo->capi_ctrl.name, card->name); |
117 | cinfo->capi_ctrl.owner = THIS_MODULE; | 117 | cinfo->capi_ctrl.owner = THIS_MODULE; |
118 | 118 | ||
@@ -251,7 +251,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev) | |||
251 | cinfo->capi_ctrl.load_firmware = b1dma_load_firmware; | 251 | cinfo->capi_ctrl.load_firmware = b1dma_load_firmware; |
252 | cinfo->capi_ctrl.reset_ctr = b1dma_reset_ctr; | 252 | cinfo->capi_ctrl.reset_ctr = b1dma_reset_ctr; |
253 | cinfo->capi_ctrl.procinfo = b1pciv4_procinfo; | 253 | cinfo->capi_ctrl.procinfo = b1pciv4_procinfo; |
254 | cinfo->capi_ctrl.proc_fops = &b1dmactl_proc_fops; | 254 | cinfo->capi_ctrl.proc_show = b1dma_proc_show; |
255 | strcpy(cinfo->capi_ctrl.name, card->name); | 255 | strcpy(cinfo->capi_ctrl.name, card->name); |
256 | 256 | ||
257 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 257 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c index 6b0d19d963d5..3aca16e62902 100644 --- a/drivers/isdn/hardware/avm/b1pcmcia.c +++ b/drivers/isdn/hardware/avm/b1pcmcia.c | |||
@@ -108,7 +108,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, | |||
108 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; | 108 | cinfo->capi_ctrl.load_firmware = b1_load_firmware; |
109 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; | 109 | cinfo->capi_ctrl.reset_ctr = b1_reset_ctr; |
110 | cinfo->capi_ctrl.procinfo = b1pcmcia_procinfo; | 110 | cinfo->capi_ctrl.procinfo = b1pcmcia_procinfo; |
111 | cinfo->capi_ctrl.proc_fops = &b1ctl_proc_fops; | 111 | cinfo->capi_ctrl.proc_show = b1_proc_show; |
112 | strcpy(cinfo->capi_ctrl.name, card->name); | 112 | strcpy(cinfo->capi_ctrl.name, card->name); |
113 | 113 | ||
114 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 114 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 034cabac699d..ac72cd204c4d 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -1127,19 +1127,6 @@ static int c4_proc_show(struct seq_file *m, void *v) | |||
1127 | return 0; | 1127 | return 0; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | static int c4_proc_open(struct inode *inode, struct file *file) | ||
1131 | { | ||
1132 | return single_open(file, c4_proc_show, PDE_DATA(inode)); | ||
1133 | } | ||
1134 | |||
1135 | static const struct file_operations c4_proc_fops = { | ||
1136 | .owner = THIS_MODULE, | ||
1137 | .open = c4_proc_open, | ||
1138 | .read = seq_read, | ||
1139 | .llseek = seq_lseek, | ||
1140 | .release = single_release, | ||
1141 | }; | ||
1142 | |||
1143 | /* ------------------------------------------------------------- */ | 1130 | /* ------------------------------------------------------------- */ |
1144 | 1131 | ||
1145 | static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, | 1132 | static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, |
@@ -1211,7 +1198,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, | |||
1211 | cinfo->capi_ctrl.load_firmware = c4_load_firmware; | 1198 | cinfo->capi_ctrl.load_firmware = c4_load_firmware; |
1212 | cinfo->capi_ctrl.reset_ctr = c4_reset_ctr; | 1199 | cinfo->capi_ctrl.reset_ctr = c4_reset_ctr; |
1213 | cinfo->capi_ctrl.procinfo = c4_procinfo; | 1200 | cinfo->capi_ctrl.procinfo = c4_procinfo; |
1214 | cinfo->capi_ctrl.proc_fops = &c4_proc_fops; | 1201 | cinfo->capi_ctrl.proc_show = c4_proc_show; |
1215 | strcpy(cinfo->capi_ctrl.name, card->name); | 1202 | strcpy(cinfo->capi_ctrl.name, card->name); |
1216 | 1203 | ||
1217 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 1204 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c index 9f80d20ced87..2153619c5b31 100644 --- a/drivers/isdn/hardware/avm/t1isa.c +++ b/drivers/isdn/hardware/avm/t1isa.c | |||
@@ -430,7 +430,7 @@ static int t1isa_probe(struct pci_dev *pdev, int cardnr) | |||
430 | cinfo->capi_ctrl.load_firmware = t1isa_load_firmware; | 430 | cinfo->capi_ctrl.load_firmware = t1isa_load_firmware; |
431 | cinfo->capi_ctrl.reset_ctr = t1isa_reset_ctr; | 431 | cinfo->capi_ctrl.reset_ctr = t1isa_reset_ctr; |
432 | cinfo->capi_ctrl.procinfo = t1isa_procinfo; | 432 | cinfo->capi_ctrl.procinfo = t1isa_procinfo; |
433 | cinfo->capi_ctrl.proc_fops = &b1ctl_proc_fops; | 433 | cinfo->capi_ctrl.proc_show = b1_proc_show; |
434 | strcpy(cinfo->capi_ctrl.name, card->name); | 434 | strcpy(cinfo->capi_ctrl.name, card->name); |
435 | 435 | ||
436 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 436 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index 2180b1685691..f5ed1d5004c9 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c | |||
@@ -119,7 +119,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) | |||
119 | cinfo->capi_ctrl.load_firmware = b1dma_load_firmware; | 119 | cinfo->capi_ctrl.load_firmware = b1dma_load_firmware; |
120 | cinfo->capi_ctrl.reset_ctr = b1dma_reset_ctr; | 120 | cinfo->capi_ctrl.reset_ctr = b1dma_reset_ctr; |
121 | cinfo->capi_ctrl.procinfo = t1pci_procinfo; | 121 | cinfo->capi_ctrl.procinfo = t1pci_procinfo; |
122 | cinfo->capi_ctrl.proc_fops = &b1dmactl_proc_fops; | 122 | cinfo->capi_ctrl.proc_show = b1dma_proc_show; |
123 | strcpy(cinfo->capi_ctrl.name, card->name); | 123 | strcpy(cinfo->capi_ctrl.name, card->name); |
124 | 124 | ||
125 | retval = attach_capi_ctr(&cinfo->capi_ctrl); | 125 | retval = attach_capi_ctr(&cinfo->capi_ctrl); |
diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c index be36d82004d6..f9244dc1c3c9 100644 --- a/drivers/isdn/hardware/eicon/capimain.c +++ b/drivers/isdn/hardware/eicon/capimain.c | |||
@@ -90,19 +90,6 @@ static int diva_ctl_proc_show(struct seq_file *m, void *v) | |||
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | static int diva_ctl_proc_open(struct inode *inode, struct file *file) | ||
94 | { | ||
95 | return single_open(file, diva_ctl_proc_show, NULL); | ||
96 | } | ||
97 | |||
98 | static const struct file_operations diva_ctl_proc_fops = { | ||
99 | .owner = THIS_MODULE, | ||
100 | .open = diva_ctl_proc_open, | ||
101 | .read = seq_read, | ||
102 | .llseek = seq_lseek, | ||
103 | .release = single_release, | ||
104 | }; | ||
105 | |||
106 | /* | 93 | /* |
107 | * set additional os settings in capi_ctr struct | 94 | * set additional os settings in capi_ctr struct |
108 | */ | 95 | */ |
@@ -111,7 +98,7 @@ void diva_os_set_controller_struct(struct capi_ctr *ctrl) | |||
111 | ctrl->driver_name = DRIVERLNAME; | 98 | ctrl->driver_name = DRIVERLNAME; |
112 | ctrl->load_firmware = NULL; | 99 | ctrl->load_firmware = NULL; |
113 | ctrl->reset_ctr = NULL; | 100 | ctrl->reset_ctr = NULL; |
114 | ctrl->proc_fops = &diva_ctl_proc_fops; | 101 | ctrl->proc_show = diva_ctl_proc_show; |
115 | ctrl->owner = THIS_MODULE; | 102 | ctrl->owner = THIS_MODULE; |
116 | } | 103 | } |
117 | 104 | ||
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c index eac0f51a0f60..a2c15cd7bf67 100644 --- a/drivers/isdn/hysdn/hycapi.c +++ b/drivers/isdn/hysdn/hycapi.c | |||
@@ -467,19 +467,6 @@ static int hycapi_proc_show(struct seq_file *m, void *v) | |||
467 | return 0; | 467 | return 0; |
468 | } | 468 | } |
469 | 469 | ||
470 | static int hycapi_proc_open(struct inode *inode, struct file *file) | ||
471 | { | ||
472 | return single_open(file, hycapi_proc_show, PDE_DATA(inode)); | ||
473 | } | ||
474 | |||
475 | static const struct file_operations hycapi_proc_fops = { | ||
476 | .owner = THIS_MODULE, | ||
477 | .open = hycapi_proc_open, | ||
478 | .read = seq_read, | ||
479 | .llseek = seq_lseek, | ||
480 | .release = single_release, | ||
481 | }; | ||
482 | |||
483 | /************************************************************** | 470 | /************************************************************** |
484 | hycapi_load_firmware | 471 | hycapi_load_firmware |
485 | 472 | ||
@@ -774,7 +761,7 @@ hycapi_capi_create(hysdn_card *card) | |||
774 | ctrl->load_firmware = hycapi_load_firmware; | 761 | ctrl->load_firmware = hycapi_load_firmware; |
775 | ctrl->reset_ctr = hycapi_reset_ctr; | 762 | ctrl->reset_ctr = hycapi_reset_ctr; |
776 | ctrl->procinfo = hycapi_procinfo; | 763 | ctrl->procinfo = hycapi_procinfo; |
777 | ctrl->proc_fops = &hycapi_proc_fops; | 764 | ctrl->proc_show = hycapi_proc_show; |
778 | strcpy(ctrl->name, cinfo->cardname); | 765 | strcpy(ctrl->name, cinfo->cardname); |
779 | ctrl->owner = THIS_MODULE; | 766 | ctrl->owner = THIS_MODULE; |
780 | 767 | ||
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h index 11b57c485854..d75e1ad72964 100644 --- a/include/linux/isdn/capilli.h +++ b/include/linux/isdn/capilli.h | |||
@@ -50,7 +50,7 @@ struct capi_ctr { | |||
50 | u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); | 50 | u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); |
51 | 51 | ||
52 | char *(*procinfo)(struct capi_ctr *); | 52 | char *(*procinfo)(struct capi_ctr *); |
53 | const struct file_operations *proc_fops; | 53 | int (*proc_show)(struct seq_file *, void *); |
54 | 54 | ||
55 | /* filled in before calling ready callback */ | 55 | /* filled in before calling ready callback */ |
56 | u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ | 56 | u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ |
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index 426a92f02db4..eb41556002e3 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c | |||
@@ -521,18 +521,6 @@ static int cmtp_proc_show(struct seq_file *m, void *v) | |||
521 | return 0; | 521 | return 0; |
522 | } | 522 | } |
523 | 523 | ||
524 | static int cmtp_proc_open(struct inode *inode, struct file *file) | ||
525 | { | ||
526 | return single_open(file, cmtp_proc_show, PDE_DATA(inode)); | ||
527 | } | ||
528 | |||
529 | static const struct file_operations cmtp_proc_fops = { | ||
530 | .open = cmtp_proc_open, | ||
531 | .read = seq_read, | ||
532 | .llseek = seq_lseek, | ||
533 | .release = single_release, | ||
534 | }; | ||
535 | |||
536 | int cmtp_attach_device(struct cmtp_session *session) | 524 | int cmtp_attach_device(struct cmtp_session *session) |
537 | { | 525 | { |
538 | unsigned char buf[4]; | 526 | unsigned char buf[4]; |
@@ -571,7 +559,7 @@ int cmtp_attach_device(struct cmtp_session *session) | |||
571 | session->ctrl.send_message = cmtp_send_message; | 559 | session->ctrl.send_message = cmtp_send_message; |
572 | 560 | ||
573 | session->ctrl.procinfo = cmtp_procinfo; | 561 | session->ctrl.procinfo = cmtp_procinfo; |
574 | session->ctrl.proc_fops = &cmtp_proc_fops; | 562 | session->ctrl.proc_show = cmtp_proc_show; |
575 | 563 | ||
576 | if (attach_capi_ctr(&session->ctrl) < 0) { | 564 | if (attach_capi_ctr(&session->ctrl) < 0) { |
577 | BT_ERR("Can't attach new controller"); | 565 | BT_ERR("Can't attach new controller"); |