USB: gadget: udc: s3c2410_udc: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Родитель
f770e3bc23
Коммит
d9d1dc8170
|
@ -119,7 +119,7 @@ static void dprintk(int level, const char *fmt, ...)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int s3c2410_udc_debugfs_seq_show(struct seq_file *m, void *p)
|
static int s3c2410_udc_debugfs_show(struct seq_file *m, void *p)
|
||||||
{
|
{
|
||||||
u32 addr_reg, pwr_reg, ep_int_reg, usb_int_reg;
|
u32 addr_reg, pwr_reg, ep_int_reg, usb_int_reg;
|
||||||
u32 ep_int_en_reg, usb_int_en_reg, ep0_csr;
|
u32 ep_int_en_reg, usb_int_en_reg, ep0_csr;
|
||||||
|
@ -168,20 +168,7 @@ static int s3c2410_udc_debugfs_seq_show(struct seq_file *m, void *p)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
DEFINE_SHOW_ATTRIBUTE(s3c2410_udc_debugfs);
|
||||||
static int s3c2410_udc_debugfs_fops_open(struct inode *inode,
|
|
||||||
struct file *file)
|
|
||||||
{
|
|
||||||
return single_open(file, s3c2410_udc_debugfs_seq_show, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct file_operations s3c2410_udc_debugfs_fops = {
|
|
||||||
.open = s3c2410_udc_debugfs_fops_open,
|
|
||||||
.read = seq_read,
|
|
||||||
.llseek = seq_lseek,
|
|
||||||
.release = single_release,
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* io macros */
|
/* io macros */
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче