diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-14 13:18:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-14 13:19:04 +0200 |
commit | 6ac1ef482d7ae0c690f1640bf6eb818ff9a2d91e (patch) | |
tree | 021cc9f6b477146fcebe6f3be4752abfa2ba18a9 /drivers/isdn/divert/divert_init.c | |
parent | 682968e0c425c60f0dde37977e5beb2b12ddc4cc (diff) | |
parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) |
Merge branch 'perf/core' into perf/uprobes
Merge in latest upstream (and the latest perf development tree),
to prepare for tooling changes, and also to pick up v3.4 MM
changes that the uprobes code needs to take care of.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/isdn/divert/divert_init.c')
-rw-r--r-- | drivers/isdn/divert/divert_init.c | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/drivers/isdn/divert/divert_init.c b/drivers/isdn/divert/divert_init.c index 2f7c9fc2e89..5374c25f036 100644 --- a/drivers/isdn/divert/divert_init.c +++ b/drivers/isdn/divert/divert_init.c @@ -3,7 +3,7 @@ * Module init for DSS1 diversion services for i4l. * * Copyright 1999 by Werner Cornelius (werner@isdn4linux.de) - * + * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * @@ -23,13 +23,13 @@ MODULE_LICENSE("GPL"); /* structure containing interface to hl */ /****************************************/ isdn_divert_if divert_if = - { DIVERT_IF_MAGIC, /* magic value */ - DIVERT_CMD_REG, /* register cmd */ - ll_callback, /* callback routine from ll */ - NULL, /* command still not specified */ - NULL, /* drv_to_name */ - NULL, /* name_to_drv */ - }; +{ DIVERT_IF_MAGIC, /* magic value */ + DIVERT_CMD_REG, /* register cmd */ + ll_callback, /* callback routine from ll */ + NULL, /* command still not specified */ + NULL, /* drv_to_name */ + NULL, /* name_to_drv */ +}; /*************************/ /* Module interface code */ @@ -38,17 +38,17 @@ isdn_divert_if divert_if = static int __init divert_init(void) { int i; - if (divert_dev_init()) - { printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n"); - return(-EIO); - } - if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) - { divert_dev_deinit(); - printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n",i); - return(-EIO); - } - printk(KERN_INFO "dss1_divert module successfully installed\n"); - return(0); + if (divert_dev_init()) + { printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n"); + return (-EIO); + } + if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) + { divert_dev_deinit(); + printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n", i); + return (-EIO); + } + printk(KERN_INFO "dss1_divert module successfully installed\n"); + return (0); } /**********************/ @@ -56,27 +56,26 @@ static int __init divert_init(void) /**********************/ static void __exit divert_exit(void) { - unsigned long flags; - int i; + unsigned long flags; + int i; - spin_lock_irqsave(&divert_lock, flags); - divert_if.cmd = DIVERT_CMD_REL; /* release */ - if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) - { printk(KERN_WARNING "dss1_divert: error %d releasing module\n",i); - spin_unlock_irqrestore(&divert_lock, flags); - return; - } - if (divert_dev_deinit()) - { printk(KERN_WARNING "dss1_divert: device busy, remove cancelled\n"); - spin_unlock_irqrestore(&divert_lock, flags); - return; - } - spin_unlock_irqrestore(&divert_lock, flags); - deleterule(-1); /* delete all rules and free mem */ - deleteprocs(); - printk(KERN_INFO "dss1_divert module successfully removed \n"); + spin_lock_irqsave(&divert_lock, flags); + divert_if.cmd = DIVERT_CMD_REL; /* release */ + if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) + { printk(KERN_WARNING "dss1_divert: error %d releasing module\n", i); + spin_unlock_irqrestore(&divert_lock, flags); + return; + } + if (divert_dev_deinit()) + { printk(KERN_WARNING "dss1_divert: device busy, remove cancelled\n"); + spin_unlock_irqrestore(&divert_lock, flags); + return; + } + spin_unlock_irqrestore(&divert_lock, flags); + deleterule(-1); /* delete all rules and free mem */ + deleteprocs(); + printk(KERN_INFO "dss1_divert module successfully removed \n"); } module_init(divert_init); module_exit(divert_exit); - |