summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2025-01-22 14:03:06 +0800
committerPing-Ke Shih <pkshih@realtek.com>2025-02-03 10:27:26 +0800
commitbdf874dc3c7639aace300cd8c5d24486b1a8ec7a (patch)
treeb243c043e2c6e6aa9ea8ba67713c030eada16e41
parent8fdf78f3cd5f87eced0c4f7eed7160a2ec31a008 (diff)
wifi: rtw89: debugfs: use debugfs_short_fops
With this change, the object code size can reduce 768 bytes. text data bss dec hex filename 77257 4262 4 81523 13e73 debug.o (before) 76489 4262 4 80755 13b73 debug.o (after) Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250122060310.31976-7-pkshih@realtek.com
-rw-r--r--drivers/net/wireless/realtek/rtw89/debug.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 35bf627dbae2..0863ed6acda2 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -217,25 +217,19 @@ static ssize_t rtw89_debugfs_file_write(struct file *file,
return debugfs_priv->cb_write(rtwdev, debugfs_priv, buf, count);
}
-static const struct file_operations file_ops_single_r = {
- .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_single_r = {
.read = rtw89_debugfs_file_read,
- .open = simple_open,
.llseek = generic_file_llseek,
};
-static const struct file_operations file_ops_common_rw = {
- .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_common_rw = {
.read = rtw89_debugfs_file_read,
.write = rtw89_debugfs_file_write,
- .open = simple_open,
.llseek = generic_file_llseek,
};
-static const struct file_operations file_ops_single_w = {
- .owner = THIS_MODULE,
+static const struct debugfs_short_fops file_ops_single_w = {
.write = rtw89_debugfs_file_write,
- .open = simple_open,
.llseek = generic_file_llseek,
};