diff mbox series

[06/10] wifi: rtw89: debugfs: use debugfs_short_fops

Message ID 20250122060310.31976-7-pkshih@realtek.com (mailing list archive)
State New
Delegated to: Ping-Ke Shih
Headers show
Series wifi: rtw89: switch to wiphy lock and work | expand

Commit Message

Ping-Ke Shih Jan. 22, 2025, 6:03 a.m. UTC
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>
---
 drivers/net/wireless/realtek/rtw89/debug.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
diff mbox series

Patch

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,
 };