From 5f1dace756f9581e7972d9090145f92d5c31891f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:18:49 -0500 Subject: [PATCH] Import 2.2.8pre3 --- net/irda/ircomm/ircomm_common.c | 12 +++--------- net/irda/irlan/irlan_common.c | 15 ++++----------- net/irda/irlpt/irlpt_cli.c | 14 ++++---------- net/irda/irlpt/irlpt_srvr.c | 14 ++++---------- net/irda/irproc.c | 8 ++++---- 5 files changed, 19 insertions(+), 44 deletions(-) diff --git a/net/irda/ircomm/ircomm_common.c b/net/irda/ircomm/ircomm_common.c index c7e805242..bc8758e1e 100644 --- a/net/irda/ircomm/ircomm_common.c +++ b/net/irda/ircomm/ircomm_common.c @@ -147,13 +147,7 @@ static char *ircommevent[] = { }; #ifdef CONFIG_PROC_FS -extern struct proc_dir_entry proc_irda; -struct proc_dir_entry proc_ircomm = { - 0, 6, "ircomm", - S_IFREG | S_IRUGO, 1, 0, 0, - 0, NULL, - &ircomm_proc_read, -}; +extern struct proc_dir_entry *proc_irda; #endif static void (*state[])( struct ircomm_cb *self, IRCOMM_EVENT event, @@ -229,7 +223,7 @@ __initfunc(int ircomm_init(void)) */ #ifdef CONFIG_PROC_FS - proc_register( &proc_irda, &proc_ircomm); + create_proc_entry("ircomm", 0, proc_irda)->get_info = ircomm_proc_read; #endif /* CONFIG_PROC_FS */ @@ -267,7 +261,7 @@ void ircomm_cleanup(void) } #ifdef CONFIG_PROC_FS - proc_unregister( &proc_irda, proc_ircomm.low_ino); + remove_proc_entry("ircomm", proc_irda); #endif /* CONFIG_PROC_FS */ } #endif /* MODULE */ diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 00619cf44..6a30574ca 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -99,15 +99,8 @@ static void irlan_close_tsaps(struct irlan_cb *self); static int irlan_proc_read(char *buf, char **start, off_t offset, int len, int unused); -extern struct proc_dir_entry proc_irda; - -struct proc_dir_entry proc_irlan = { - 0, 5, "irlan", - S_IFREG | S_IRUGO, 1, 0, 0, - 0, NULL, - &irlan_proc_read, -}; -#endif /* CONFIG_PROC_FS */ +extern struct proc_dir_entry *proc_irda; +#endif void irlan_watchdog_timer_expired(unsigned long data) { @@ -188,7 +181,7 @@ __initfunc(int irlan_init(void)) return -ENOMEM; } #ifdef CONFIG_PROC_FS - proc_register(&proc_irda, &proc_irlan); + create_proc_entry("irlan", 0, proc_irda)->get_info = irlan_proc_read; #endif /* CONFIG_PROC_FS */ DEBUG(4, __FUNCTION__ "()\n"); @@ -224,7 +217,7 @@ void irlan_cleanup(void) irlmp_unregister_service(skey); #ifdef CONFIG_PROC_FS - proc_unregister(&proc_irda, proc_irlan.low_ino); + remove_proc_entry("irlan", proc_irda); #endif /* CONFIG_PROC_FS */ /* * Delete hashbin and close all irlan client instances in it diff --git a/net/irda/irlpt/irlpt_cli.c b/net/irda/irlpt/irlpt_cli.c index 6ccd7a3d9..a0fbe23d6 100644 --- a/net/irda/irlpt/irlpt_cli.c +++ b/net/irda/irlpt/irlpt_cli.c @@ -157,14 +157,7 @@ static int irlpt_client_proc_read( char *buf, char **start, off_t offset, return len; } -struct proc_dir_entry proc_irlpt_client = { - 0, 12, "irlpt_client", - S_IFREG | S_IRUGO, 1, 0, 0, - 0, NULL /* ops -- default to array */, - &irlpt_client_proc_read /* get_info */, -}; - -extern struct proc_dir_entry proc_irda; +extern struct proc_dir_entry *proc_irda; #endif /* CONFIG_PROC_FS */ @@ -193,7 +186,8 @@ __initfunc(int irlpt_client_init(void)) NULL); #ifdef CONFIG_PROC_FS - proc_register( &proc_irda, &proc_irlpt_client); + create_proc_entry("irlpt_client", 0, proc_irda)->get_info + = irlpt_client_proc_read; #endif /* CONFIG_PROC_FS */ DEBUG( irlpt_client_debug, __FUNCTION__ " -->\n"); @@ -219,7 +213,7 @@ static void irlpt_client_cleanup(void) hashbin_delete( irlpt_clients, (FREE_FUNC) irlpt_client_close); #ifdef CONFIG_PROC_FS - proc_unregister( &proc_irda, proc_irlpt_client.low_ino); + remove_proc_entry("irlpt_client", proc_irda); #endif DEBUG( irlpt_client_debug, __FUNCTION__ " -->\n"); diff --git a/net/irda/irlpt/irlpt_srvr.c b/net/irda/irlpt/irlpt_srvr.c index ec7339e0e..a1362d0dc 100644 --- a/net/irda/irlpt/irlpt_srvr.c +++ b/net/irda/irlpt/irlpt_srvr.c @@ -160,14 +160,7 @@ static int irlpt_server_proc_read(char *buf, char **start, off_t offset, return len; } -extern struct proc_dir_entry proc_irda; - -struct proc_dir_entry proc_irlpt_server = { - 0, 12, "irlpt_server", - S_IFREG | S_IRUGO, 1, 0, 0, - 0, NULL /* ops -- default to array */, - &irlpt_server_proc_read /* get_info */, -}; +extern struct proc_dir_entry *proc_irda; #endif /* CONFIG_PROC_FS */ @@ -215,7 +208,8 @@ __initfunc(int irlpt_server_init(void)) register_irlpt_server(); #ifdef CONFIG_PROC_FS - proc_register( &proc_irda, &proc_irlpt_server); + create_proc_entry("irlpt_server", 0, proc_irda)->get_info + = irlpt_server_proc_read; #endif /* CONFIG_PROC_FS */ DEBUG( irlpt_server_debug, __FUNCTION__ " -->\n"); @@ -248,7 +242,7 @@ static void irlpt_server_cleanup(void) kfree(irlpt_server); #ifdef CONFIG_PROC_FS - proc_unregister( &proc_irda, proc_irlpt_server.low_ino); + remove_proc_entry("irlpt_server", proc_irda); #endif DEBUG( irlpt_server_debug, __FUNCTION__ " -->\n"); diff --git a/net/irda/irproc.c b/net/irda/irproc.c index 6828c5159..98f1ee2ba 100644 --- a/net/irda/irproc.c +++ b/net/irda/irproc.c @@ -84,12 +84,12 @@ static irda_entry dir[] = { */ void irda_proc_register(void) { int i; - proc_irda = proc_create_entry("net/irda", S_IFDIR, NULL); + proc_irda = create_proc_entry("net/irda", S_IFDIR, NULL); #ifdef MODULE proc_irda->fill_inode = &irda_proc_modcount; #endif /* MODULE */ for (i=0;iget_info=dir[i].fn; + create_proc_entry(dir[i].name,0,proc_irda)->get_info=dir[i].fn; } /* @@ -101,6 +101,6 @@ void irda_proc_register(void) { void irda_proc_unregister(void) { int i; for (i=0;i