Skip to content

Commit 67a344e

Browse files
Qinglang Miaokrzk
authored andcommitted
memory: tegra: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200917125114.103598-1-miaoqinglang@huawei.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
1 parent 26cb1d2 commit 67a344e

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

drivers/memory/tegra/tegra124-emc.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,19 +1060,7 @@ static int tegra_emc_debug_available_rates_show(struct seq_file *s,
10601060
return 0;
10611061
}
10621062

1063-
static int tegra_emc_debug_available_rates_open(struct inode *inode,
1064-
struct file *file)
1065-
{
1066-
return single_open(file, tegra_emc_debug_available_rates_show,
1067-
inode->i_private);
1068-
}
1069-
1070-
static const struct file_operations tegra_emc_debug_available_rates_fops = {
1071-
.open = tegra_emc_debug_available_rates_open,
1072-
.read = seq_read,
1073-
.llseek = seq_lseek,
1074-
.release = single_release,
1075-
};
1063+
DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates);
10761064

10771065
static int tegra_emc_debug_min_rate_get(void *data, u64 *rate)
10781066
{

0 commit comments

Comments
 (0)