]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/usb/host/isp1362-hcd.c
procfs: new helper - PDE_DATA(inode)
[mirror_ubuntu-bionic-kernel.git] / drivers / usb / host / isp1362-hcd.c
index 974480c516fabc956f200f2c42941f281d792238..b04e8ece4d35f448c6b8ac5b23b9c198b0702702 100644 (file)
@@ -2175,7 +2175,7 @@ static int proc_isp1362_show(struct seq_file *s, void *unused)
 
 static int proc_isp1362_open(struct inode *inode, struct file *file)
 {
-       return single_open(file, proc_isp1362_show, PDE(inode)->data);
+       return single_open(file, proc_isp1362_show, PDE_DATA(inode));
 }
 
 static const struct file_operations proc_ops = {
@@ -2192,14 +2192,11 @@ static void create_debug_file(struct isp1362_hcd *isp1362_hcd)
 {
        struct proc_dir_entry *pde;
 
-       pde = create_proc_entry(proc_filename, 0, NULL);
+       pde = proc_create_data(proc_filename, 0, NULL, &proc_ops, isp1362_hcd);
        if (pde == NULL) {
                pr_warning("%s: Failed to create debug file '%s'\n", __func__, proc_filename);
                return;
        }
-
-       pde->proc_fops = &proc_ops;
-       pde->data = isp1362_hcd;
        isp1362_hcd->pde = pde;
 }