diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2007-02-10 04:45:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:32 -0500 |
commit | b653d081c17e26101980c858a9808740533b78b4 (patch) | |
tree | 907b6e6d97f30b61840cf4b1654f88a1df56945c /arch/mips/philips | |
parent | 891dcd2f7ab15e2aaad07f6925b3a53fd8d5c02f (diff) |
[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 <adobriyan@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/philips')
-rw-r--r-- | arch/mips/philips/pnx8550/common/proc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c index 72a016767e09..3f097558ef13 100644 --- a/arch/mips/philips/pnx8550/common/proc.c +++ b/arch/mips/philips/pnx8550/common/proc.c | |||
@@ -79,10 +79,7 @@ static int pnx8550_proc_init( void ) | |||
79 | 79 | ||
80 | // Create /proc/pnx8550 | 80 | // Create /proc/pnx8550 |
81 | pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); | 81 | pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); |
82 | if (pnx8550_dir){ | 82 | if (!pnx8550_dir) { |
83 | pnx8550_dir->nlink = 1; | ||
84 | } | ||
85 | else { | ||
86 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); | 83 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); |
87 | return -1; | 84 | return -1; |
88 | } | 85 | } |
@@ -90,7 +87,6 @@ static int pnx8550_proc_init( void ) | |||
90 | // Create /proc/pnx8550/timers | 87 | // Create /proc/pnx8550/timers |
91 | pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); | 88 | pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); |
92 | if (pnx8550_timers){ | 89 | if (pnx8550_timers){ |
93 | pnx8550_timers->nlink = 1; | ||
94 | pnx8550_timers->read_proc = pnx8550_timers_read; | 90 | pnx8550_timers->read_proc = pnx8550_timers_read; |
95 | } | 91 | } |
96 | else { | 92 | else { |
@@ -100,7 +96,6 @@ static int pnx8550_proc_init( void ) | |||
100 | // Create /proc/pnx8550/registers | 96 | // Create /proc/pnx8550/registers |
101 | pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); | 97 | pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); |
102 | if (pnx8550_registers){ | 98 | if (pnx8550_registers){ |
103 | pnx8550_registers->nlink = 1; | ||
104 | pnx8550_registers->read_proc = pnx8550_registers_read; | 99 | pnx8550_registers->read_proc = pnx8550_registers_read; |
105 | } | 100 | } |
106 | else { | 101 | else { |