Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=105b1bca4d7bed85bb296f7e7caec2fc643e9fbf
Commit:     105b1bca4d7bed85bb296f7e7caec2fc643e9fbf
Parent:     569fb7536ea66e3364a8ff0b26598c6c9874d657
Author:     Robert P. J. Day <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 06:37:56 2007 -0400
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 17:33:07 2007 +0100

    [MIPS] PNX8550: Cleanup proc code.
    
    Here's a slightly cleaner way of creating the /proc structure for the
    pnx8850.  mostly, it creates a directory with default mode 555, since the
    one you're creating is mode 444, which is somewhat unusual for a directory
    under /proc.
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 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 3f09755..92311e9 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 )
 {
 
        // Create /proc/pnx8550
-        pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL);
+        pnx8550_dir = proc_mkdir("pnx8550", NULL);
         if (!pnx8550_dir) {
                 printk(KERN_ERR "Can't create pnx8550 proc dir\n");
                 return -1;
         }
 
        // Create /proc/pnx8550/timers
-        pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, 
pnx8550_dir );
-        if (pnx8550_timers){
-                pnx8550_timers->read_proc = pnx8550_timers_read;
-        }
-        else {
+        pnx8550_timers = create_proc_read_entry(
+               "timers",
+               0,
+               pnx8550_dir,
+               pnx8550_timers_read,
+               NULL);
+
+        if (!pnx8550_timers)
                 printk(KERN_ERR "Can't create pnx8550 timers proc file\n");
-        }
 
        // Create /proc/pnx8550/registers
-        pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, 
pnx8550_dir );
-        if (pnx8550_registers){
-                pnx8550_registers->read_proc = pnx8550_registers_read;
-        }
-        else {
+        pnx8550_registers = create_proc_read_entry(
+               "registers",
+               0,
+               pnx8550_dir,
+               pnx8550_registers_read,
+               NULL);
+
+        if (!pnx8550_registers)
                 printk(KERN_ERR "Can't create pnx8550 registers proc file\n");
-        }
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to