Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: isp1362-hcd: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Yangtao Li and committed by
Greg Kroah-Hartman
9e412c66 5ac93d0c

+3 -13
+3 -13
drivers/usb/host/isp1362-hcd.c
··· 2159 2159 2160 2160 return 0; 2161 2161 } 2162 - 2163 - static int isp1362_open(struct inode *inode, struct file *file) 2164 - { 2165 - return single_open(file, isp1362_show, inode); 2166 - } 2167 - 2168 - static const struct file_operations debug_ops = { 2169 - .open = isp1362_open, 2170 - .read = seq_read, 2171 - .llseek = seq_lseek, 2172 - .release = single_release, 2173 - }; 2162 + DEFINE_SHOW_ATTRIBUTE(isp1362); 2174 2163 2175 2164 /* expect just one isp1362_hcd per system */ 2176 2165 static void create_debug_file(struct isp1362_hcd *isp1362_hcd) 2177 2166 { 2178 2167 isp1362_hcd->debug_file = debugfs_create_file("isp1362", S_IRUGO, 2179 2168 usb_debug_root, 2180 - isp1362_hcd, &debug_ops); 2169 + isp1362_hcd, 2170 + &isp1362_fops); 2181 2171 } 2182 2172 2183 2173 static void remove_debug_file(struct isp1362_hcd *isp1362_hcd)