mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] proc: remove useless (and buggy) ->nlink settings
Bug: pnx8550 code creates directory but resets ->nlink to 1. create_proc_entry() et al will correctly set ->nlink for you. Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Corey Minyard <[email protected]> Cc: Alan Cox <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Greg KH <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
891dcd2f7a
commit
b653d081c1
15 changed files with 1 additions and 25 deletions
|
|
@ -1887,7 +1887,6 @@ int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
|
|||
kfree(entry);
|
||||
rv = -ENOMEM;
|
||||
} else {
|
||||
file->nlink = 1;
|
||||
file->data = data;
|
||||
file->read_proc = read_proc;
|
||||
file->write_proc = write_proc;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,6 @@ void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void
|
|||
while (p->name != NULL) {
|
||||
ent = create_proc_entry(p->name, p->mode, dir);
|
||||
if (!ent) return;
|
||||
ent->nlink = 1;
|
||||
ent->data = data;
|
||||
ent->read_proc = p->read_proc;
|
||||
ent->write_proc = p->write_proc;
|
||||
|
|
|
|||
|
|
@ -516,7 +516,6 @@ static int __init via_pmu_dev_init(void)
|
|||
proc_get_irqstats, NULL);
|
||||
proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root);
|
||||
if (proc_pmu_options) {
|
||||
proc_pmu_options->nlink = 1;
|
||||
proc_pmu_options->read_proc = proc_read_options;
|
||||
proc_pmu_options->write_proc = proc_write_options;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,11 +72,9 @@ static int hdpu_nexus_probe(struct platform_device *pdev)
|
|||
printk("Could not map slot id\n");
|
||||
hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root);
|
||||
hdpu_slot_id->read_proc = hdpu_slot_id_read;
|
||||
hdpu_slot_id->nlink = 1;
|
||||
|
||||
hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root);
|
||||
hdpu_chassis_id->read_proc = hdpu_chassis_id_read;
|
||||
hdpu_chassis_id->nlink = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,6 @@ static int __init led_create_procfs(void)
|
|||
proc_pdc_root->owner = THIS_MODULE;
|
||||
ent = create_proc_entry("led", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root);
|
||||
if (!ent) return -1;
|
||||
ent->nlink = 1;
|
||||
ent->data = (void *)LED_NOLCD; /* LED */
|
||||
ent->read_proc = led_proc_read;
|
||||
ent->write_proc = led_proc_write;
|
||||
|
|
@ -262,7 +261,6 @@ static int __init led_create_procfs(void)
|
|||
{
|
||||
ent = create_proc_entry("lcd", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root);
|
||||
if (!ent) return -1;
|
||||
ent->nlink = 1;
|
||||
ent->data = (void *)LED_HASLCD; /* LCD */
|
||||
ent->read_proc = led_proc_read;
|
||||
ent->write_proc = led_proc_write;
|
||||
|
|
|
|||
|
|
@ -1063,7 +1063,6 @@ int __init zcrypt_api_init(void)
|
|||
rc = -ENOMEM;
|
||||
goto out_misc;
|
||||
}
|
||||
zcrypt_entry->nlink = 1;
|
||||
zcrypt_entry->data = NULL;
|
||||
zcrypt_entry->read_proc = zcrypt_status_read;
|
||||
zcrypt_entry->write_proc = zcrypt_status_write;
|
||||
|
|
|
|||
|
|
@ -1419,7 +1419,6 @@ int __devinit rndis_init (void)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
rndis_connect_state [i]->nlink = 1;
|
||||
rndis_connect_state [i]->write_proc = rndis_proc_write;
|
||||
rndis_connect_state [i]->read_proc = rndis_proc_read;
|
||||
rndis_connect_state [i]->data = (void *)
|
||||
|
|
|
|||
Loading…
Reference in a new issue