Commit 9d3b96be authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman
Browse files

debugfs_get_aux(): allow storing non-const void *

parent 00bbe512
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1128,7 +1128,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,

static int gb_camera_debugfs_open(struct inode *inode, struct file *file)
{
	file->private_data = (void *)debugfs_get_aux(file);
	file->private_data = debugfs_get_aux(file);
	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ const struct file_operations debugfs_noop_file_operations = {

#define F_DENTRY(filp) ((filp)->f_path.dentry)

const void *debugfs_get_aux(const struct file *file)
void *debugfs_get_aux(const struct file *file)
{
	return DEBUGFS_I(file_inode(file))->aux;
}
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ static struct dentry *__debugfs_create_file(const char *name, umode_t mode,
		proxy_fops = &debugfs_noop_file_operations;
	inode->i_fop = proxy_fops;
	DEBUGFS_I(inode)->raw = real_fops;
	DEBUGFS_I(inode)->aux = aux;
	DEBUGFS_I(inode)->aux = (void *)aux;

	d_instantiate(dentry, inode);
	fsnotify_create(d_inode(dentry->d_parent), dentry);
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ struct debugfs_inode_info {
		const struct debugfs_short_fops *short_fops;
		debugfs_automount_t automount;
	};
	const void *aux;
	void *aux;
};

static inline struct debugfs_inode_info *DEBUGFS_I(struct inode *inode)
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ void debugfs_remove(struct dentry *dentry);

void debugfs_lookup_and_remove(const char *name, struct dentry *parent);

const void *debugfs_get_aux(const struct file *file);
void *debugfs_get_aux(const struct file *file);

int debugfs_file_get(struct dentry *dentry);
void debugfs_file_put(struct dentry *dentry);