file.c (dd77a4ee0f3981693d4229aa1d57cea9e526ff47) file.c (8e18e2941c53416aa219708e7dcad21fb4bd6794)
1/*
2 * file.c - part of debugfs, a tiny little debug file system
3 *
4 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 2004 IBM Inc.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version

--- 18 unchanged lines hidden (view full) ---

27static ssize_t default_write_file(struct file *file, const char __user *buf,
28 size_t count, loff_t *ppos)
29{
30 return count;
31}
32
33static int default_open(struct inode *inode, struct file *file)
34{
1/*
2 * file.c - part of debugfs, a tiny little debug file system
3 *
4 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
5 * Copyright (C) 2004 IBM Inc.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version

--- 18 unchanged lines hidden (view full) ---

27static ssize_t default_write_file(struct file *file, const char __user *buf,
28 size_t count, loff_t *ppos)
29{
30 return count;
31}
32
33static int default_open(struct inode *inode, struct file *file)
34{
35 if (inode->u.generic_ip)
36 file->private_data = inode->u.generic_ip;
35 if (inode->i_private)
36 file->private_data = inode->i_private;
37
38 return 0;
39}
40
41const struct file_operations debugfs_file_operations = {
42 .read = default_read_file,
43 .write = default_write_file,
44 .open = default_open,

--- 248 unchanged lines hidden ---
37
38 return 0;
39}
40
41const struct file_operations debugfs_file_operations = {
42 .read = default_read_file,
43 .write = default_write_file,
44 .open = default_open,

--- 248 unchanged lines hidden ---