mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
gpio: sloppy-logic-analyzer: use debugfs_create_file() for buf_size and capture
The "buf_size" and "capture" debugfs files are created with debugfs_create_file_unsafe() and DEFINE_DEBUGFS_ATTRIBUTE() fops. That is safe on its own: debugfs_attr_read()/write() take a debugfs reference themselves, so debugfs_remove_recursive() drains them on removal. Now that "trigger" uses debugfs_create_file(), switch these two to the same call so all three debugfs files in this driver are created uniformly. This is a cosmetic change; the extra debugfs_file_get()/put() added by the full_proxy wrapper is negligible. Suggested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Assisted-by: Claude:claude-opus-4.8 Signed-off-by: Cengiz Can <cengiz.can@canonical.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20260730220258.358169-3-cengiz.can@canonical.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
d42c1df90d
commit
beb0556bcc
|
|
@ -299,8 +299,8 @@ static int gpio_la_poll_probe(struct platform_device *pdev)
|
|||
debugfs_create_blob("meta_data", 0400, priv->debug_dir, &priv->meta);
|
||||
debugfs_create_ulong("delay_ns", 0600, priv->debug_dir, &priv->delay_ns);
|
||||
debugfs_create_ulong("delay_ns_acquisition", 0400, priv->debug_dir, &priv->acq_delay);
|
||||
debugfs_create_file_unsafe("buf_size", 0600, priv->debug_dir, priv, &fops_buf_size);
|
||||
debugfs_create_file_unsafe("capture", 0200, priv->debug_dir, priv, &fops_capture);
|
||||
debugfs_create_file("buf_size", 0600, priv->debug_dir, priv, &fops_buf_size);
|
||||
debugfs_create_file("capture", 0200, priv->debug_dir, priv, &fops_capture);
|
||||
debugfs_create_file("trigger", 0200, priv->debug_dir, priv, &fops_trigger);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user