mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
proc: Delete create_proc_read_entry()
Delete create_proc_read_entry() as it no longer has any users. Also delete read_proc_t, write_proc_t, the read_proc member of the proc_dir_entry struct and the support functions that use them. This saves a pointer for every PDE allocated. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
526c59784c
commit
3cb5bf1bf9
4 changed files with 1 additions and 220 deletions
|
@ -183,41 +183,6 @@ void proc_entry_rundown(struct proc_dir_entry *de)
|
|||
spin_unlock(&de->pde_unload_lock);
|
||||
}
|
||||
|
||||
/* ->read_proc() users - legacy crap */
|
||||
static ssize_t
|
||||
proc_file_read(struct file *file, char __user *buf, size_t nbytes,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct proc_dir_entry *pde = PDE(file_inode(file));
|
||||
ssize_t rv = -EIO;
|
||||
if (use_pde(pde)) {
|
||||
rv = __proc_file_read(file, buf, nbytes, ppos);
|
||||
unuse_pde(pde);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static loff_t
|
||||
proc_file_lseek(struct file *file, loff_t offset, int orig)
|
||||
{
|
||||
loff_t retval = -EINVAL;
|
||||
switch (orig) {
|
||||
case 1:
|
||||
offset += file->f_pos;
|
||||
/* fallthrough */
|
||||
case 0:
|
||||
if (offset < 0 || offset > MAX_NON_LFS)
|
||||
break;
|
||||
file->f_pos = retval = offset;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
const struct file_operations proc_file_operations = {
|
||||
.llseek = proc_file_lseek,
|
||||
.read = proc_file_read,
|
||||
};
|
||||
|
||||
static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence)
|
||||
{
|
||||
struct proc_dir_entry *pde = PDE(file_inode(file));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue