isdn: replace ->proc_fops with ->proc_show

And switch to proc_create_single_data.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2018-04-11 18:39:29 +02:00
parent a2d03aac51
commit 2cd1f0ddbb
15 changed files with 20 additions and 110 deletions

View File

@@ -521,18 +521,6 @@ static int cmtp_proc_show(struct seq_file *m, void *v)
return 0;
}
static int cmtp_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, cmtp_proc_show, PDE_DATA(inode));
}
static const struct file_operations cmtp_proc_fops = {
.open = cmtp_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
int cmtp_attach_device(struct cmtp_session *session)
{
unsigned char buf[4];
@@ -571,7 +559,7 @@ int cmtp_attach_device(struct cmtp_session *session)
session->ctrl.send_message = cmtp_send_message;
session->ctrl.procinfo = cmtp_procinfo;
session->ctrl.proc_fops = &cmtp_proc_fops;
session->ctrl.proc_show = cmtp_proc_show;
if (attach_capi_ctr(&session->ctrl) < 0) {
BT_ERR("Can't attach new controller");