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

dmaengine: amba-pl08x: 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: Vinod Koul <vkoul@kernel.org>

authored by

Yangtao Li and committed by
Vinod Koul
8e1897bc a5b21a8b

+2 -12
+2 -12
drivers/dma/amba-pl08x.c
··· 2505 2505 return 0; 2506 2506 } 2507 2507 2508 - static int pl08x_debugfs_open(struct inode *inode, struct file *file) 2509 - { 2510 - return single_open(file, pl08x_debugfs_show, inode->i_private); 2511 - } 2512 - 2513 - static const struct file_operations pl08x_debugfs_operations = { 2514 - .open = pl08x_debugfs_open, 2515 - .read = seq_read, 2516 - .llseek = seq_lseek, 2517 - .release = single_release, 2518 - }; 2508 + DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs); 2519 2509 2520 2510 static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) 2521 2511 { 2522 2512 /* Expose a simple debugfs interface to view all clocks */ 2523 2513 (void) debugfs_create_file(dev_name(&pl08x->adev->dev), 2524 2514 S_IFREG | S_IRUGO, NULL, pl08x, 2525 - &pl08x_debugfs_operations); 2515 + &pl08x_debugfs_fops); 2526 2516 } 2527 2517 2528 2518 #else