diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2018-02-23 03:47:26 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-03-05 07:04:29 -0500 |
commit | 64c1412b77d08df1bc4ddea1187eb8a76df1186c (patch) | |
tree | 9e69ac0623a55b44f1b3538f3552bc40fc1ecae4 | |
parent | 871cfe05f40b52ebb692c56eecd1d27b673d8a21 (diff) |
mmc: dw_mmc: Convert to use DEFINE_SHOW_ATTRIBUTE
Use the newly added macro to simply to the code.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index d9b4acefed31..5332120030e4 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -147,19 +147,7 @@ static int dw_mci_req_show(struct seq_file *s, void *v) | |||
147 | 147 | ||
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | DEFINE_SHOW_ATTRIBUTE(dw_mci_req); | |
151 | static int dw_mci_req_open(struct inode *inode, struct file *file) | ||
152 | { | ||
153 | return single_open(file, dw_mci_req_show, inode->i_private); | ||
154 | } | ||
155 | |||
156 | static const struct file_operations dw_mci_req_fops = { | ||
157 | .owner = THIS_MODULE, | ||
158 | .open = dw_mci_req_open, | ||
159 | .read = seq_read, | ||
160 | .llseek = seq_lseek, | ||
161 | .release = single_release, | ||
162 | }; | ||
163 | 151 | ||
164 | static int dw_mci_regs_show(struct seq_file *s, void *v) | 152 | static int dw_mci_regs_show(struct seq_file *s, void *v) |
165 | { | 153 | { |
@@ -178,19 +166,7 @@ static int dw_mci_regs_show(struct seq_file *s, void *v) | |||
178 | 166 | ||
179 | return 0; | 167 | return 0; |
180 | } | 168 | } |
181 | 169 | DEFINE_SHOW_ATTRIBUTE(dw_mci_regs); | |
182 | static int dw_mci_regs_open(struct inode *inode, struct file *file) | ||
183 | { | ||
184 | return single_open(file, dw_mci_regs_show, inode->i_private); | ||
185 | } | ||
186 | |||
187 | static const struct file_operations dw_mci_regs_fops = { | ||
188 | .owner = THIS_MODULE, | ||
189 | .open = dw_mci_regs_open, | ||
190 | .read = seq_read, | ||
191 | .llseek = seq_lseek, | ||
192 | .release = single_release, | ||
193 | }; | ||
194 | 170 | ||
195 | static void dw_mci_init_debugfs(struct dw_mci_slot *slot) | 171 | static void dw_mci_init_debugfs(struct dw_mci_slot *slot) |
196 | { | 172 | { |