return 0;
 }
 
-static int ulpi_regs_read(struct seq_file *seq, void *data)
+static int ulpi_regs_show(struct seq_file *seq, void *data)
 {
        struct ulpi *ulpi = seq->private;
 
 
        return 0;
 }
-
-static int ulpi_regs_open(struct inode *inode, struct file *f)
-{
-       struct ulpi *ulpi = inode->i_private;
-
-       return single_open(f, ulpi_regs_read, ulpi);
-}
-
-static const struct file_operations ulpi_regs_ops = {
-       .owner = THIS_MODULE,
-       .open = ulpi_regs_open,
-       .release = single_release,
-       .read = seq_read,
-       .llseek = seq_lseek
-};
+DEFINE_SHOW_ATTRIBUTE(ulpi_regs);
 
 #define ULPI_ROOT debugfs_lookup(KBUILD_MODNAME, NULL)
 
        }
 
        root = debugfs_create_dir(dev_name(dev), ULPI_ROOT);
-       debugfs_create_file("regs", 0444, root, ulpi, &ulpi_regs_ops);
+       debugfs_create_file("regs", 0444, root, ulpi, &ulpi_regs_fops);
 
        dev_dbg(&ulpi->dev, "registered ULPI PHY: vendor %04x, product %04x\n",
                ulpi->id.vendor, ulpi->id.product);