Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / isdn / hardware / eicon / divasmain.c
index bbb7d8f..16a874b 100644 (file)
@@ -9,18 +9,14 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/devfs_fs_kernel.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <linux/ioport.h>
 #include <linux/workqueue.h>
 #include <linux/pci.h>
-#include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/poll.h>
@@ -60,8 +56,7 @@ static char *DRIVERLNAME = "divas";
 static char *DEVNAME = "Divas";
 char *DRIVERRELEASE_DIVAS = "2.0";
 
-extern irqreturn_t diva_os_irq_wrapper(int irq, void *context,
-                               struct pt_regs *regs);
+extern irqreturn_t diva_os_irq_wrapper(int irq, void *context);
 extern int create_divas_proc(void);
 extern void remove_divas_proc(void);
 extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
@@ -188,7 +183,7 @@ void diva_log_info(unsigned char *format, ...)
        unsigned char line[160];
 
        va_start(args, format);
-       vsprintf(line, format, args);
+       vsnprintf(line, sizeof(line), format, args);
        va_end(args);
 
        printk(KERN_INFO "%s: %s\n", DRIVERLNAME, line);
@@ -398,7 +393,7 @@ void diva_free_dma_map(void *hdev, struct _diva_dma_map_entry *pmap)
        dma_addr_t dma_handle;
        void *addr_handle;
 
-       for (i = 0; (pmap != 0); i++) {
+       for (i = 0; (pmap != NULL); i++) {
                diva_get_dma_map_entry(pmap, i, &cpu_addr, &phys_addr);
                if (!cpu_addr) {
                        break;
@@ -488,7 +483,7 @@ void __inline__ outpp(void __iomem *addr, word p)
 int diva_os_register_irq(void *context, byte irq, const char *name)
 {
        int result = request_irq(irq, diva_os_irq_wrapper,
-                                SA_INTERRUPT | SA_SHIRQ, name, context);
+                                IRQF_DISABLED | IRQF_SHARED, name, context);
        return (result);
 }
 
@@ -666,7 +661,7 @@ static unsigned int divas_poll(struct file *file, poll_table * wait)
        return (POLLIN | POLLRDNORM);
 }
 
-static struct file_operations divas_fops = {
+static const struct file_operations divas_fops = {
        .owner   = THIS_MODULE,
        .llseek  = no_llseek,
        .read    = divas_read,
@@ -811,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
 
        if (!create_divas_proc()) {
 #ifdef MODULE
-               remove_divas_proc();
                divas_unregister_chrdev();
                divasfunc_exit();
 #endif