mmc: 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: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
@@ -1652,7 +1652,7 @@ static struct mmc_host_ops omap_hsmmc_ops = {
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
|
||||
static int mmc_regs_show(struct seq_file *s, void *data)
|
||||
{
|
||||
struct mmc_host *mmc = s->private;
|
||||
struct omap_hsmmc_host *host = mmc_priv(mmc);
|
||||
@@ -1691,17 +1691,7 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_regs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, omap_hsmmc_regs_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations mmc_regs_fops = {
|
||||
.open = omap_hsmmc_regs_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(mmc_regs);
|
||||
|
||||
static void omap_hsmmc_debugfs(struct mmc_host *mmc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user