mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull debugfs patches from Al Viro:
"debugfs patches, mostly to make it possible for something like tracefs
to be transparently automounted on given directory in debugfs.
New primitive in there is debugfs_create_automount(name, parent, func,
arg), which creates a directory and makes its ->d_automount() return
func(arg). Another missing primitive was debugfs_create_file_size() -
open-coded in quite a few places. Dave's patch adds it and converts
the open-code instances to calling it"
* 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
debugfs: Provide a file creation function that also takes an initial size
new primitive: debugfs_create_automount()
debugfs: split end_creating() into success and failure cases
debugfs: take mode-dependent parts of debugfs_get_inode() into callers
fold debugfs_mknod() into callers
fold debugfs_create() into caller
fold debugfs_mkdir() into caller
debugfs_mknod(): get rid useless arguments
fold debugfs_link() into caller
debugfs: kill __create_file()
debugfs: split the beginning and the end of __create_file() off
debugfs_{mkdir,create,link}(): get rid of redundant argument
This commit is contained in:
commit
c6b1de1b64
6 changed files with 212 additions and 165 deletions
|
|
@ -113,12 +113,9 @@ static const struct file_operations csio_mem_debugfs_fops = {
|
|||
void csio_add_debugfs_mem(struct csio_hw *hw, const char *name,
|
||||
unsigned int idx, unsigned int size_mb)
|
||||
{
|
||||
struct dentry *de;
|
||||
|
||||
de = debugfs_create_file(name, S_IRUSR, hw->debugfs_root,
|
||||
(void *)hw + idx, &csio_mem_debugfs_fops);
|
||||
if (de && de->d_inode)
|
||||
de->d_inode->i_size = size_mb << 20;
|
||||
debugfs_create_file_size(name, S_IRUSR, hw->debugfs_root,
|
||||
(void *)hw + idx, &csio_mem_debugfs_fops,
|
||||
size_mb << 20);
|
||||
}
|
||||
|
||||
static int csio_setup_debugfs(struct csio_hw *hw)
|
||||
|
|
|
|||
Loading…
Reference in a new issue