mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
procfs: new helper - PDE_DATA(inode)
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
8510e30b46
commit
d9dda78bad
95 changed files with 243 additions and 302 deletions
|
|
@ -1408,7 +1408,7 @@ static int idecd_capacity_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idecd_capacity_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idecd_capacity_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idecd_capacity_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idecd_capacity_proc_fops = {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static int idedisk_cache_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idedisk_cache_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idedisk_cache_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idedisk_cache_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idedisk_cache_proc_fops = {
|
||||
|
|
@ -74,7 +74,7 @@ static int idedisk_capacity_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idedisk_capacity_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idedisk_capacity_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idedisk_capacity_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idedisk_capacity_proc_fops = {
|
||||
|
|
@ -115,7 +115,7 @@ static int idedisk_sv_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idedisk_sv_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idedisk_sv_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idedisk_sv_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idedisk_sv_proc_fops = {
|
||||
|
|
@ -133,7 +133,7 @@ static int idedisk_st_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idedisk_st_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idedisk_st_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idedisk_st_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idedisk_st_proc_fops = {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ static int idefloppy_capacity_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idefloppy_capacity_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idefloppy_capacity_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idefloppy_capacity_proc_fops = {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static int ide_imodel_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_imodel_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_imodel_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_imodel_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_imodel_proc_fops = {
|
||||
|
|
@ -82,7 +82,7 @@ static int ide_mate_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_mate_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_mate_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_mate_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_mate_proc_fops = {
|
||||
|
|
@ -103,7 +103,7 @@ static int ide_channel_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_channel_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_channel_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_channel_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_channel_proc_fops = {
|
||||
|
|
@ -143,7 +143,7 @@ static int ide_identify_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_identify_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_identify_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_identify_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_identify_proc_fops = {
|
||||
|
|
@ -325,7 +325,7 @@ static int ide_settings_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_settings_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_settings_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_settings_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
#define MAX_LEN 30
|
||||
|
|
@ -333,7 +333,7 @@ static int ide_settings_proc_open(struct inode *inode, struct file *file)
|
|||
static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos)
|
||||
{
|
||||
ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
|
||||
ide_drive_t *drive = PDE_DATA(file_inode(file));
|
||||
char name[MAX_LEN + 1];
|
||||
int for_real = 0, mul_factor, div_factor;
|
||||
unsigned long n;
|
||||
|
|
@ -474,7 +474,7 @@ static int ide_geometry_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_geometry_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_geometry_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_geometry_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
const struct file_operations ide_geometry_proc_fops = {
|
||||
|
|
@ -497,7 +497,7 @@ static int ide_dmodel_proc_show(struct seq_file *seq, void *v)
|
|||
|
||||
static int ide_dmodel_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_dmodel_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_dmodel_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_dmodel_proc_fops = {
|
||||
|
|
@ -525,7 +525,7 @@ static int ide_driver_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_driver_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_driver_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_driver_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
|
||||
|
|
@ -558,7 +558,7 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
|
|||
static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer,
|
||||
size_t count, loff_t *pos)
|
||||
{
|
||||
ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
|
||||
ide_drive_t *drive = PDE_DATA(file_inode(file));
|
||||
char name[32];
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
|
|
@ -601,7 +601,7 @@ static int ide_media_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int ide_media_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, ide_media_proc_show, PDE(inode)->data);
|
||||
return single_open(file, ide_media_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations ide_media_proc_fops = {
|
||||
|
|
|
|||
|
|
@ -1847,7 +1847,7 @@ static int idetape_name_proc_show(struct seq_file *m, void *v)
|
|||
|
||||
static int idetape_name_proc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, idetape_name_proc_show, PDE(inode)->data);
|
||||
return single_open(file, idetape_name_proc_show, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
static const struct file_operations idetape_name_proc_fops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue