Source
2498
2498
list_for_each_entry(chan, &pl08x->slave.channels,
2499
2499
vc.chan.device_node) {
2500
2500
seq_printf(s, "%s\t\t%s\n", chan->name,
2501
2501
pl08x_state_str(chan->state));
2502
2502
}
2503
2503
}
2504
2504
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
2529
2519
static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
2530
2520
{
2531
2521
}
2532
2522
#endif
2533
2523
2534
2524
#ifdef CONFIG_OF
2535
2525
static struct dma_chan *pl08x_find_chan_id(struct pl08x_driver_data *pl08x,