.. | .. |
---|
120 | 120 | struct brcm_message msg; |
---|
121 | 121 | struct dma_async_tx_descriptor tx; |
---|
122 | 122 | /* SBA commands */ |
---|
123 | | - struct brcm_sba_command cmds[0]; |
---|
| 123 | + struct brcm_sba_command cmds[]; |
---|
124 | 124 | }; |
---|
125 | 125 | |
---|
126 | 126 | enum sba_version { |
---|
.. | .. |
---|
164 | 164 | struct list_head reqs_free_list; |
---|
165 | 165 | /* DebugFS directory entries */ |
---|
166 | 166 | struct dentry *root; |
---|
167 | | - struct dentry *stats; |
---|
168 | 167 | }; |
---|
169 | 168 | |
---|
170 | 169 | /* ====== Command helper routines ===== */ |
---|
.. | .. |
---|
1459 | 1458 | |
---|
1460 | 1459 | static int sba_debugfs_stats_show(struct seq_file *file, void *offset) |
---|
1461 | 1460 | { |
---|
1462 | | - struct platform_device *pdev = to_platform_device(file->private); |
---|
1463 | | - struct sba_device *sba = platform_get_drvdata(pdev); |
---|
| 1461 | + struct sba_device *sba = dev_get_drvdata(file->private); |
---|
1464 | 1462 | |
---|
1465 | 1463 | /* Write stats in file */ |
---|
1466 | 1464 | sba_write_stats_in_seqfile(sba, file); |
---|
.. | .. |
---|
1717 | 1715 | |
---|
1718 | 1716 | /* Create debugfs root entry */ |
---|
1719 | 1717 | sba->root = debugfs_create_dir(dev_name(sba->dev), NULL); |
---|
1720 | | - if (IS_ERR_OR_NULL(sba->root)) { |
---|
1721 | | - dev_err(sba->dev, "failed to create debugfs root entry\n"); |
---|
1722 | | - sba->root = NULL; |
---|
1723 | | - goto skip_debugfs; |
---|
1724 | | - } |
---|
1725 | 1718 | |
---|
1726 | 1719 | /* Create debugfs stats entry */ |
---|
1727 | | - sba->stats = debugfs_create_devm_seqfile(sba->dev, "stats", sba->root, |
---|
1728 | | - sba_debugfs_stats_show); |
---|
1729 | | - if (IS_ERR_OR_NULL(sba->stats)) |
---|
1730 | | - dev_err(sba->dev, "failed to create debugfs stats file\n"); |
---|
| 1720 | + debugfs_create_devm_seqfile(sba->dev, "stats", sba->root, |
---|
| 1721 | + sba_debugfs_stats_show); |
---|
| 1722 | + |
---|
1731 | 1723 | skip_debugfs: |
---|
1732 | 1724 | |
---|
1733 | 1725 | /* Register DMA device with Linux async framework */ |
---|