[v1,3/3] pwm: core: Remove S_IFREG from debugfs_create_file()

Message ID 20221101174255.54452-3-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v1,1/3] pwm: core: Refactor pwmchip_add() to avoid extra checks |

Commit Message

Andy Shevchenko Nov. 1, 2022, 5:42 p.m. UTC
  The debugfs_create_file() already has a check and adds S_IFREG
automatically. Remove unneeded flag.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pwm/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 36128f3301ac..c004a8a662d6 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -1179,8 +1179,7 @@  DEFINE_SEQ_ATTRIBUTE(pwm_debugfs);
 
 static int __init pwm_debugfs_init(void)
 {
-	debugfs_create_file("pwm", S_IFREG | 0444, NULL, NULL,
-			    &pwm_debugfs_fops);
+	debugfs_create_file("pwm", 0444, NULL, NULL, &pwm_debugfs_fops);
 
 	return 0;
 }