diff options
| -rw-r--r-- | arch/mips/philips/pnx8550/common/proc.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c index 3f097558ef13..92311e95b700 100644 --- a/arch/mips/philips/pnx8550/common/proc.c +++ b/arch/mips/philips/pnx8550/common/proc.c | |||
| @@ -78,29 +78,33 @@ static int pnx8550_proc_init( void ) | |||
| 78 | { | 78 | { |
| 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 = proc_mkdir("pnx8550", NULL); |
| 82 | if (!pnx8550_dir) { | 82 | if (!pnx8550_dir) { |
| 83 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); | 83 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); |
| 84 | return -1; | 84 | return -1; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | // Create /proc/pnx8550/timers | 87 | // Create /proc/pnx8550/timers |
| 88 | pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); | 88 | pnx8550_timers = create_proc_read_entry( |
| 89 | if (pnx8550_timers){ | 89 | "timers", |
| 90 | pnx8550_timers->read_proc = pnx8550_timers_read; | 90 | 0, |
| 91 | } | 91 | pnx8550_dir, |
| 92 | else { | 92 | pnx8550_timers_read, |
| 93 | NULL); | ||
| 94 | |||
| 95 | if (!pnx8550_timers) | ||
| 93 | printk(KERN_ERR "Can't create pnx8550 timers proc file\n"); | 96 | printk(KERN_ERR "Can't create pnx8550 timers proc file\n"); |
| 94 | } | ||
| 95 | 97 | ||
| 96 | // Create /proc/pnx8550/registers | 98 | // Create /proc/pnx8550/registers |
| 97 | pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); | 99 | pnx8550_registers = create_proc_read_entry( |
| 98 | if (pnx8550_registers){ | 100 | "registers", |
| 99 | pnx8550_registers->read_proc = pnx8550_registers_read; | 101 | 0, |
| 100 | } | 102 | pnx8550_dir, |
| 101 | else { | 103 | pnx8550_registers_read, |
| 104 | NULL); | ||
| 105 | |||
| 106 | if (!pnx8550_registers) | ||
| 102 | printk(KERN_ERR "Can't create pnx8550 registers proc file\n"); | 107 | printk(KERN_ERR "Can't create pnx8550 registers proc file\n"); |
| 103 | } | ||
| 104 | 108 | ||
| 105 | return 0; | 109 | return 0; |
| 106 | } | 110 | } |
