Skip to contentSkip to conversation

usb: dwc3: debugfs: Re-use DEFINE_SHOW_ATTRIBUTE() macro

DISCUSSION Andy Shevchenko 1 participant 1 message Feb 15, 2018 USB

lore
Share & tools
lore

Andy Shevchenko

author Reviewed-by
#0 lore raw
Quoted 3 lines · Felipe Balbi

...instead of open coding file operations followed by custom ->open() callbacks per each attribute.

Though one comment below.

Review

Quoted 8 lines

static void dwc3_debugfs_create_endpoint_file(struct dwc3_ep *dep,

(quoted diff) +3 -0
+		struct dentry *parent, const char *const name,
+		const struct file_operations *const fops)
 {
+	(void) debugfs_create_file(name, S_IRUGO, parent, dep, fops);
 }

At this point why do you need one line function anymore?

Quoted 2 lines
(quoted diff) +2 -0
+		dwc3_debugfs_create_endpoint_file(dep, parent,
+				name, fops);