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
This commit is contained in:
Ping-Ke Shih 2025-01-22 14:03:06 +08:00
parent 8fdf78f3cd
commit bdf874dc3c

View File

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