Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memory: tegra210-emc: Use DEFINE_SHOW_ATTRIBUTE to simplify code

Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No
functional change.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Liu Shixin and committed by
Thierry Reding
d4a5db55 db70b332

+1 -14
+1 -14
drivers/memory/tegra/tegra210-emc-core.c
··· 1621 1621 1622 1622 return 0; 1623 1623 } 1624 - 1625 - static int tegra210_emc_debug_available_rates_open(struct inode *inode, 1626 - struct file *file) 1627 - { 1628 - return single_open(file, tegra210_emc_debug_available_rates_show, 1629 - inode->i_private); 1630 - } 1631 - 1632 - static const struct file_operations tegra210_emc_debug_available_rates_fops = { 1633 - .open = tegra210_emc_debug_available_rates_open, 1634 - .read = seq_read, 1635 - .llseek = seq_lseek, 1636 - .release = single_release, 1637 - }; 1624 + DEFINE_SHOW_ATTRIBUTE(tegra210_emc_debug_available_rates); 1638 1625 1639 1626 static int tegra210_emc_debug_min_rate_get(void *data, u64 *rate) 1640 1627 {