Staging: meilhaus: some checkpatch.pl cleanup
authorAlexander Beregalov <a.beregalov@gmail.com>
Mon, 16 Mar 2009 16:45:13 +0000 (19:45 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:28 +0000 (14:53 -0700)
Cc: David Kiliani <mail@davidkiliani.de>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
45 files changed:
drivers/staging/meilhaus/me0600_device.c
drivers/staging/meilhaus/me0600_dio.c
drivers/staging/meilhaus/me0600_ext_irq.c
drivers/staging/meilhaus/me0600_optoi.c
drivers/staging/meilhaus/me0600_relay.c
drivers/staging/meilhaus/me0600_ttli.c
drivers/staging/meilhaus/me0900_device.c
drivers/staging/meilhaus/me0900_di.c
drivers/staging/meilhaus/me0900_do.c
drivers/staging/meilhaus/me1000_device.c
drivers/staging/meilhaus/me1000_dio.c
drivers/staging/meilhaus/me1400_device.c
drivers/staging/meilhaus/me1400_ext_irq.c
drivers/staging/meilhaus/me1600_ao.c
drivers/staging/meilhaus/me1600_device.c
drivers/staging/meilhaus/me4600_ai.c
drivers/staging/meilhaus/me4600_ao.c
drivers/staging/meilhaus/me4600_device.c
drivers/staging/meilhaus/me4600_di.c
drivers/staging/meilhaus/me4600_dio.c
drivers/staging/meilhaus/me4600_do.c
drivers/staging/meilhaus/me4600_ext_irq.c
drivers/staging/meilhaus/me6000_ao.c
drivers/staging/meilhaus/me6000_device.c
drivers/staging/meilhaus/me6000_dio.c
drivers/staging/meilhaus/me8100_device.c
drivers/staging/meilhaus/me8100_di.c
drivers/staging/meilhaus/me8100_do.c
drivers/staging/meilhaus/me8200_device.c
drivers/staging/meilhaus/me8200_di.c
drivers/staging/meilhaus/me8200_dio.c
drivers/staging/meilhaus/me8200_do.c
drivers/staging/meilhaus/me8254.c
drivers/staging/meilhaus/me8255.c
drivers/staging/meilhaus/mecirc_buf.h
drivers/staging/meilhaus/medevice.c
drivers/staging/meilhaus/medlist.c
drivers/staging/meilhaus/medlock.c
drivers/staging/meilhaus/medummy.c
drivers/staging/meilhaus/memain.c
drivers/staging/meilhaus/meslist.c
drivers/staging/meilhaus/meslock.c
drivers/staging/meilhaus/mesubdevice.c
drivers/staging/meilhaus/metempl_device.c
drivers/staging/meilhaus/metempl_sub.c

index 8950e47..bae17d2 100644 (file)
@@ -186,6 +186,7 @@ me_device_t *me0600_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me0600_device;
 }
+EXPORT_SYMBOL(me0600_pci_constructor);
 
 // Init and exit of module.
 
@@ -210,6 +211,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for ME-6xx Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-6xx Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me0600_pci_constructor);
index 3a27757..d293035 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -91,7 +91,7 @@ static int me0600_dio_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_dio_io_single_config(me_subdevice_t * subdevice,
+static int me0600_dio_io_single_config(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int single_config,
@@ -162,7 +162,7 @@ static int me0600_dio_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_dio_io_single_read(me_subdevice_t * subdevice,
+static int me0600_dio_io_single_read(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int *value, int time_out, int flags)
@@ -242,7 +242,7 @@ static int me0600_dio_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_dio_io_single_write(me_subdevice_t * subdevice,
+static int me0600_dio_io_single_write(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int value, int time_out, int flags)
@@ -329,7 +329,7 @@ static int me0600_dio_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_dio_query_number_channels(me_subdevice_t * subdevice,
+static int me0600_dio_query_number_channels(me_subdevice_t *subdevice,
                                            int *number)
 {
        PDEBUG("executed.\n");
@@ -337,7 +337,7 @@ static int me0600_dio_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_dio_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0600_dio_query_subdevice_type(me_subdevice_t *subdevice,
                                           int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -346,7 +346,7 @@ static int me0600_dio_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_dio_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me0600_dio_query_subdevice_caps(me_subdevice_t *subdevice,
                                           int *caps)
 {
        PDEBUG("executed.\n");
@@ -356,7 +356,7 @@ static int me0600_dio_query_subdevice_caps(me_subdevice_t * subdevice,
 
 me0600_dio_subdevice_t *me0600_dio_constructor(uint32_t reg_base,
                                               unsigned int dio_idx,
-                                              spinlock_t * ctrl_reg_lock)
+                                              spinlock_t *ctrl_reg_lock)
 {
        me0600_dio_subdevice_t *subdevice;
        int err;
@@ -381,7 +381,7 @@ me0600_dio_subdevice_t *me0600_dio_constructor(uint32_t reg_base,
                kfree(subdevice);
                return NULL;
        }
-       // Initialize spin locks.
+       /* Initialize spin locks. */
        spin_lock_init(&subdevice->subdevice_lock);
 
        subdevice->ctrl_reg_lock = ctrl_reg_lock;
index 7863fbe..2f6fedc 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 
@@ -393,7 +393,7 @@ static irqreturn_t me0600_isr(int irq, void *dev_id)
 
 me0600_ext_irq_subdevice_t *me0600_ext_irq_constructor(uint32_t plx_reg_base,
                                                       uint32_t me0600_reg_base,
-                                                      spinlock_t * intcsr_lock,
+                                                      spinlock_t *intcsr_lock,
                                                       unsigned ext_irq_idx,
                                                       int irq)
 {
index b6d977f..43f710f 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -68,7 +68,7 @@ static int me0600_optoi_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_optoi_io_single_config(me_subdevice_t * subdevice,
+static int me0600_optoi_io_single_config(me_subdevice_t *subdevice,
                                         struct file *filep,
                                         int channel,
                                         int single_config,
@@ -118,7 +118,7 @@ static int me0600_optoi_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_optoi_io_single_read(me_subdevice_t * subdevice,
+static int me0600_optoi_io_single_read(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int *value, int time_out, int flags)
@@ -169,7 +169,7 @@ static int me0600_optoi_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_optoi_query_number_channels(me_subdevice_t * subdevice,
+static int me0600_optoi_query_number_channels(me_subdevice_t *subdevice,
                                              int *number)
 {
        PDEBUG("executed.\n");
@@ -177,7 +177,7 @@ static int me0600_optoi_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_optoi_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0600_optoi_query_subdevice_type(me_subdevice_t *subdevice,
                                             int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -186,7 +186,7 @@ static int me0600_optoi_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_optoi_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me0600_optoi_query_subdevice_caps(me_subdevice_t *subdevice,
                                             int *caps)
 {
        PDEBUG("executed.\n");
@@ -219,7 +219,7 @@ me0600_optoi_subdevice_t *me0600_optoi_constructor(uint32_t reg_base)
                kfree(subdevice);
                return NULL;
        }
-       // Initialize spin locks.
+       /* Initialize spin locks. */
        spin_lock_init(&subdevice->subdevice_lock);
 
        /* Save the subdevice index */
index 2665c69..03835e3 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -85,7 +85,7 @@ static int me0600_relay_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_relay_io_single_config(me_subdevice_t * subdevice,
+static int me0600_relay_io_single_config(me_subdevice_t *subdevice,
                                         struct file *filep,
                                         int channel,
                                         int single_config,
@@ -135,7 +135,7 @@ static int me0600_relay_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_relay_io_single_read(me_subdevice_t * subdevice,
+static int me0600_relay_io_single_read(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int *value, int time_out, int flags)
@@ -203,7 +203,7 @@ static int me0600_relay_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_relay_io_single_write(me_subdevice_t * subdevice,
+static int me0600_relay_io_single_write(me_subdevice_t *subdevice,
                                        struct file *filep,
                                        int channel,
                                        int value, int time_out, int flags)
@@ -279,7 +279,7 @@ static int me0600_relay_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_relay_query_number_channels(me_subdevice_t * subdevice,
+static int me0600_relay_query_number_channels(me_subdevice_t *subdevice,
                                              int *number)
 {
        PDEBUG("executed.\n");
@@ -287,7 +287,7 @@ static int me0600_relay_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_relay_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0600_relay_query_subdevice_type(me_subdevice_t *subdevice,
                                             int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -296,7 +296,7 @@ static int me0600_relay_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_relay_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me0600_relay_query_subdevice_caps(me_subdevice_t *subdevice,
                                             int *caps)
 {
        PDEBUG("executed.\n");
index ab8e13b..7d970f5 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -67,7 +67,7 @@ static int me0600_ttli_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_ttli_io_single_config(me_subdevice_t * subdevice,
+static int me0600_ttli_io_single_config(me_subdevice_t *subdevice,
                                        struct file *filep,
                                        int channel,
                                        int single_config,
@@ -116,7 +116,7 @@ static int me0600_ttli_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_ttli_io_single_read(me_subdevice_t * subdevice,
+static int me0600_ttli_io_single_read(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int *value, int time_out, int flags)
@@ -164,7 +164,7 @@ static int me0600_ttli_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0600_ttli_query_number_channels(me_subdevice_t * subdevice,
+static int me0600_ttli_query_number_channels(me_subdevice_t *subdevice,
                                             int *number)
 {
        PDEBUG("executed.\n");
@@ -172,7 +172,7 @@ static int me0600_ttli_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_ttli_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0600_ttli_query_subdevice_type(me_subdevice_t *subdevice,
                                            int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -181,7 +181,7 @@ static int me0600_ttli_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0600_ttli_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me0600_ttli_query_subdevice_caps(me_subdevice_t *subdevice,
                                            int *caps)
 {
        PDEBUG("executed.\n");
index 764d5d3..e9c6884 100644 (file)
@@ -152,6 +152,7 @@ me_device_t *me0900_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me0900_device;
 }
+EXPORT_SYMBOL(me0900_pci_constructor);
 
 // Init and exit of module.
 
@@ -175,6 +176,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for ME-9x Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-9x Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me0900_pci_constructor);
index d7d7394..4665b2a 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/version.h>
@@ -71,7 +71,7 @@ static int me0900_di_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_di_io_single_config(me_subdevice_t * subdevice,
+static int me0900_di_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -115,7 +115,7 @@ static int me0900_di_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0900_di_io_single_read(me_subdevice_t * subdevice,
+static int me0900_di_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -161,7 +161,7 @@ static int me0900_di_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0900_di_query_number_channels(me_subdevice_t * subdevice,
+static int me0900_di_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -169,7 +169,7 @@ static int me0900_di_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_di_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0900_di_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -178,7 +178,7 @@ static int me0900_di_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_di_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me0900_di_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = 0;
index b5b9c3a..a2275fa 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -81,7 +81,7 @@ static int me0900_do_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_do_io_single_config(me_subdevice_t * subdevice,
+static int me0900_do_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -125,7 +125,7 @@ static int me0900_do_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0900_do_io_single_read(me_subdevice_t * subdevice,
+static int me0900_do_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -171,7 +171,7 @@ static int me0900_do_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0900_do_io_single_write(me_subdevice_t * subdevice,
+static int me0900_do_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -223,7 +223,7 @@ static int me0900_do_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me0900_do_query_number_channels(me_subdevice_t * subdevice,
+static int me0900_do_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -231,7 +231,7 @@ static int me0900_do_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_do_query_subdevice_type(me_subdevice_t * subdevice,
+static int me0900_do_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -240,7 +240,7 @@ static int me0900_do_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me0900_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me0900_do_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = 0;
index c44e214..cf0fb92 100644 (file)
@@ -49,8 +49,8 @@
 #include "mesubdevice.h"
 #include "me1000_dio.h"
 
-static int me1000_config_load(me_device_t * me_device, struct file *filep,
-                             me_cfg_device_entry_t * config)
+static int me1000_config_load(me_device_t *me_device, struct file *filep,
+                             me_cfg_device_entry_t *config)
 {
        me1000_device_t *me1000_device;
        me1000_dio_subdevice_t *dio;
@@ -181,6 +181,7 @@ me_device_t *me1000_pci_constructor(struct pci_dev * pci_device)
 
        return (me_device_t *) me1000_device;
 }
+EXPORT_SYMBOL(me1000_pci_constructor);
 
 // Init and exit of module.
 static int __init me1000_init(void)
@@ -203,6 +204,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for Meilhaus ME-1000 Devices");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-1000 Digital I/O Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me1000_pci_constructor);
index 87605a9..2d7ed07 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -371,7 +371,7 @@ static int me1000_dio_query_subdevice_caps(struct me_subdevice *subdevice,
 
 me1000_dio_subdevice_t *me1000_dio_constructor(uint32_t reg_base,
                                               unsigned int dio_idx,
-                                              spinlock_t * ctrl_reg_lock)
+                                              spinlock_t *ctrl_reg_lock)
 {
        me1000_dio_subdevice_t *subdevice;
        int err;
index b95bb4f..ca7498b 100644 (file)
@@ -228,6 +228,7 @@ me_device_t *me1400_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me1400_device;
 }
+EXPORT_SYMBOL(me1400_pci_constructor);
 
 // Init and exit of module.
 
@@ -251,6 +252,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for Meilhaus ME-14xx devices");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-14xx MIO devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me1400_pci_constructor);
index 766e42d..0dc6b45 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 
index 6ead7a3..12e3c70 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/sched.h>
 
@@ -57,30 +57,30 @@ static void me1600_ao_destructor(struct me_subdevice *subdevice);
 
 static void me1600_ao_work_control_task(struct work_struct *work);
 
-static int me1600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me1600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags);
-static int me1600_ao_io_single_config(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep, int channel,
                                      int single_config, int ref, int trig_chan,
                                      int trig_type, int trig_edge, int flags);
-static int me1600_ao_io_single_read(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep, int channel, int *value,
                                    int time_out, int flags);
-static int me1600_ao_io_single_write(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep, int channel, int value,
                                     int time_out, int flags);
-static int me1600_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me1600_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number);
-static int me1600_ao_query_subdevice_type(me_subdevice_t * subdevice, int *type,
+static int me1600_ao_query_subdevice_type(me_subdevice_t *subdevice, int *type,
                                          int *subtype);
-static int me1600_ao_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me1600_ao_query_subdevice_caps(me_subdevice_t *subdevice,
                                          int *caps);
-static int me1600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me1600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit, int *min, int *max,
                                            int *maxdata, int *range);
-static int me1600_ao_query_number_ranges(me_subdevice_t * subdevice, int unit,
+static int me1600_ao_query_number_ranges(me_subdevice_t *subdevice, int unit,
                                         int *count);
-static int me1600_ao_query_range_info(me_subdevice_t * subdevice, int range,
+static int me1600_ao_query_range_info(me_subdevice_t *subdevice, int range,
                                      int *unit, int *min, int *max,
                                      int *maxdata);
 
@@ -90,10 +90,9 @@ static int me1600_ao_query_range_info(me_subdevice_t * subdevice, int range,
 me1600_ao_subdevice_t *me1600_ao_constructor(uint32_t reg_base,
                                             unsigned int ao_idx,
                                             int curr,
-                                            spinlock_t * config_regs_lock,
-                                            spinlock_t * ao_shadows_lock,
-                                            me1600_ao_shadow_t *
-                                            ao_regs_shadows,
+                                            spinlock_t *config_regs_lock,
+                                            spinlock_t *ao_shadows_lock,
+                                            me1600_ao_shadow_t *ao_regs_shadows,
                                             struct workqueue_struct *me1600_wq)
 {
        me1600_ao_subdevice_t *subdevice;
@@ -222,7 +221,7 @@ static void me1600_ao_destructor(struct me_subdevice *subdevice)
        }
 }
 
-static int me1600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me1600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags)
 {
        me1600_ao_subdevice_t *instance;
@@ -304,7 +303,7 @@ static int me1600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_io_single_config(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -536,7 +535,7 @@ static int me1600_ao_io_single_config(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_io_single_read(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -603,7 +602,7 @@ static int me1600_ao_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me1600_ao_io_single_write(me_subdevice_t * subdevice,
+static int me1600_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -786,7 +785,7 @@ static int me1600_ao_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me1600_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me1600_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        me1600_ao_subdevice_t *instance;
@@ -798,7 +797,7 @@ static int me1600_ao_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_query_subdevice_type(me_subdevice_t * subdevice, int *type,
+static int me1600_ao_query_subdevice_type(me_subdevice_t *subdevice, int *type,
                                          int *subtype)
 {
        me1600_ao_subdevice_t *instance;
@@ -811,14 +810,14 @@ static int me1600_ao_query_subdevice_type(me_subdevice_t * subdevice, int *type,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me1600_ao_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = ME_CAPS_AO_TRIG_SYNCHRONOUS;
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me1600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range)
@@ -896,7 +895,7 @@ static int me1600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_query_number_ranges(me_subdevice_t * subdevice,
+static int me1600_ao_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count)
 {
        me1600_ao_subdevice_t *instance;
@@ -921,7 +920,7 @@ static int me1600_ao_query_number_ranges(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1600_ao_query_range_info(me_subdevice_t * subdevice,
+static int me1600_ao_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata)
index 3bc2cb1..c244e98 100644 (file)
@@ -48,7 +48,7 @@
 #include "mesubdevice.h"
 #include "me1600_device.h"
 
-static void me1600_set_registry(me1600_device_t * subdevice, uint32_t reg_base);
+static void me1600_set_registry(me1600_device_t *subdevice, uint32_t reg_base);
 static void me1600_destructor(struct me_device *device);
 
 /**
@@ -142,6 +142,7 @@ me_device_t *me1600_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me1600_device;
 }
+EXPORT_SYMBOL(me1600_pci_constructor);
 
 static void me1600_destructor(struct me_device *device)
 {
@@ -157,7 +158,7 @@ static void me1600_destructor(struct me_device *device)
        kfree(me1600_device);
 }
 
-static void me1600_set_registry(me1600_device_t * subdevice, uint32_t reg_base)
+static void me1600_set_registry(me1600_device_t *subdevice, uint32_t reg_base)
 {                              // Create shadow structure.
        if (subdevice->ao_regs_shadows.count >= 1) {
                subdevice->ao_regs_shadows.registry[0] =
@@ -256,6 +257,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for ME-1600 Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-1600 Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me1600_pci_constructor);
index 35bde02..a3cfef0 100644 (file)
@@ -36,8 +36,8 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
  */
 
 static void me4600_ai_destructor(struct me_subdevice *subdevice);
-static int me4600_ai_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ai_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags);
 
-static int me4600_ai_io_single_config(me_subdevice_t * subdevice,
+static int me4600_ai_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -68,110 +68,110 @@ static int me4600_ai_io_single_config(me_subdevice_t * subdevice,
                                      int trig_chan,
                                      int trig_type, int trig_edge, int flags);
 
-static int me4600_ai_io_single_read(me_subdevice_t * subdevice,
+static int me4600_ai_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags);
 
-static int me4600_ai_io_stream_config(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags);
-static int me4600_ai_io_stream_read(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int read_mode,
                                    int *values, int *count, int flags);
-static int me4600_ai_io_stream_new_values(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags);
-static int inline me4600_ai_io_stream_read_get_value(me4600_ai_subdevice_t *
+static inline int me4600_ai_io_stream_read_get_value(me4600_ai_subdevice_t *
                                                     instance, int *values,
                                                     const int count,
                                                     const int flags);
 
-static int me4600_ai_io_stream_start(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags);
-static int me4600_ai_io_stream_stop(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags);
-static int me4600_ai_io_stream_status(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags);
 
-static int me4600_ai_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me4600_ai_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range);
-static int me4600_ai_query_number_ranges(me_subdevice_t * subdevice,
+static int me4600_ai_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count);
-static int me4600_ai_query_range_info(me_subdevice_t * subdevice,
+static int me4600_ai_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata);
-static int me4600_ai_query_timer(me_subdevice_t * subdevice,
+static int me4600_ai_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks);
-static int me4600_ai_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_ai_query_number_channels(me_subdevice_t *subdevice,
                                           int *number);
-static int me4600_ai_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_ai_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype);
-static int me4600_ai_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me4600_ai_query_subdevice_caps(me_subdevice_t *subdevice,
                                          int *caps);
 static int me4600_ai_query_subdevice_caps_args(struct me_subdevice *subdevice,
                                               int cap, int *args, int count);
 
 static irqreturn_t me4600_ai_isr(int irq, void *dev_id);
 
-static int ai_mux_toggler(me4600_ai_subdevice_t * subdevice);
+static int ai_mux_toggler(me4600_ai_subdevice_t *subdevice);
 
 /** Immidiate stop.
 * Reset all IRQ's sources. (block laches)
 * Preserve FIFO
 */
-static int ai_stop_immediately(me4600_ai_subdevice_t * instance);
+static int ai_stop_immediately(me4600_ai_subdevice_t *instance);
 
 /** Immidiate stop.
 * Reset all IRQ's sources. (block laches)
 * Reset data FIFO
 */
-void inline ai_stop_isr(me4600_ai_subdevice_t * instance);
+inline void ai_stop_isr(me4600_ai_subdevice_t *instance);
 
 /** Interrupt logics.
 * Read datas
 * Reset latches
 */
-void ai_limited_isr(me4600_ai_subdevice_t * instance, const uint32_t irq_status,
+void ai_limited_isr(me4600_ai_subdevice_t *instance, const uint32_t irq_status,
                    const uint32_t ctrl_status);
-void ai_infinite_isr(me4600_ai_subdevice_t * instance,
+void ai_infinite_isr(me4600_ai_subdevice_t *instance,
                     const uint32_t irq_status, const uint32_t ctrl_status);
 
 /** Last chunck of datas. We must reschedule sample counter.
 * Leaving SC_RELOAD doesn't do any harm, but in some bad case can make extra interrupts.
 * When threshold is wrongly set some IRQ are lost.(!!!)
 */
-void inline ai_reschedule_SC(me4600_ai_subdevice_t * instance);
+inline void ai_reschedule_SC(me4600_ai_subdevice_t *instance);
 
 /** Read datas from FIFO and copy them to buffer */
-static int inline ai_read_data(me4600_ai_subdevice_t * instance,
+static inline int ai_read_data(me4600_ai_subdevice_t *instance,
                               const int count);
 
 /** Copy rest of data from fifo to circular buffer.*/
-static int inline ai_read_data_pooling(me4600_ai_subdevice_t * instance);
+static inline int ai_read_data_pooling(me4600_ai_subdevice_t *instance);
 
 /** Set ISM to next state for infinite data aqusation mode*/
-void inline ai_infinite_ISM(me4600_ai_subdevice_t * instance);
+inline void ai_infinite_ISM(me4600_ai_subdevice_t *instance);
 
 /** Set ISM to next state for define amount of data aqusation mode*/
-void inline ai_limited_ISM(me4600_ai_subdevice_t * instance,
+inline void ai_limited_ISM(me4600_ai_subdevice_t *instance,
                           uint32_t irq_status);
 
 /** Set ISM to next stage for limited mode */
-void inline ai_data_acquisition_logic(me4600_ai_subdevice_t * instance);
+inline void ai_data_acquisition_logic(me4600_ai_subdevice_t *instance);
 
 static void me4600_ai_work_control_task(struct work_struct *work);
 
@@ -184,7 +184,7 @@ me4600_ai_subdevice_t *me4600_ai_constructor(uint32_t reg_base,
                                             int isolated,
                                             int sh,
                                             int irq,
-                                            spinlock_t * ctrl_reg_lock,
+                                            spinlock_t *ctrl_reg_lock,
                                             struct workqueue_struct *me4600_wq)
 {
        me4600_ai_subdevice_t *subdevice;
@@ -384,7 +384,7 @@ static void me4600_ai_destructor(struct me_subdevice *subdevice)
        kfree(instance);
 }
 
-static int me4600_ai_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ai_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags)
 {
        me4600_ai_subdevice_t *instance;
@@ -506,7 +506,7 @@ static int me4600_ai_io_reset_subdevice(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ai_io_single_config(me_subdevice_t * subdevice,
+static int me4600_ai_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -696,7 +696,7 @@ static int me4600_ai_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ai_io_single_read(me_subdevice_t * subdevice,
+static int me4600_ai_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -902,11 +902,11 @@ static int me4600_ai_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ai_io_stream_config(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags)
 {
        me4600_ai_subdevice_t *instance;
@@ -1573,15 +1573,15 @@ static int me4600_ai_io_stream_config(me_subdevice_t * subdevice,
                    ME_SINGLE_CHANNEL_NOT_CONFIGURED;
        }
 
-      VERIFY_ERROR:            // Error in code. Wrong setting check. This should never ever happend!
+VERIFY_ERROR:          // Error in code. Wrong setting check. This should never ever happend!
        spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
-      ERROR:                   // Error in settings.
+ERROR:                 // Error in settings.
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ai_io_stream_new_values(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags)
 {
@@ -1664,7 +1664,7 @@ static int me4600_ai_io_stream_new_values(me_subdevice_t * subdevice,
        return err;
 }
 
-static int inline me4600_ai_io_stream_read_get_value(me4600_ai_subdevice_t *
+static inline int me4600_ai_io_stream_read_get_value(me4600_ai_subdevice_t *
                                                     instance, int *values,
                                                     const int count,
                                                     const int flags)
@@ -1699,7 +1699,7 @@ static int inline me4600_ai_io_stream_read_get_value(me4600_ai_subdevice_t *
        return n;
 }
 
-static int me4600_ai_io_stream_read(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int read_mode,
                                    int *values, int *count, int flags)
@@ -1825,7 +1825,7 @@ static int me4600_ai_io_stream_read(me_subdevice_t * subdevice,
 * @param instance The subdevice instance (pointer).
 */
 
-static int ai_stop_immediately(me4600_ai_subdevice_t * instance)
+static int ai_stop_immediately(me4600_ai_subdevice_t *instance)
 {
        unsigned long cpu_flags = 0;
        volatile uint32_t ctrl;
@@ -1864,7 +1864,7 @@ static int ai_stop_immediately(me4600_ai_subdevice_t * instance)
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_io_stream_start(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags)
 {
@@ -2042,13 +2042,13 @@ static int me4600_ai_io_stream_start(me_subdevice_t * subdevice,
              (tmp & ME4600_AI_CTRL_BIT_SC_IRQ_RESET) ? "reset" : "work");
 #endif
 
-      ERROR:
+ERROR:
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ai_io_stream_status(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags)
@@ -2126,7 +2126,7 @@ static int me4600_ai_io_stream_status(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ai_io_stream_stop(me_subdevice_t * subdevice,
+static int me4600_ai_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags)
 {
@@ -2223,7 +2223,7 @@ static int me4600_ai_io_stream_stop(me_subdevice_t * subdevice,
        return ret;
 }
 
-static int me4600_ai_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me4600_ai_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range)
@@ -2275,7 +2275,7 @@ static int me4600_ai_query_range_by_min_max(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_number_ranges(me_subdevice_t * subdevice,
+static int me4600_ai_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count)
 {
        me4600_ai_subdevice_t *instance;
@@ -2293,7 +2293,7 @@ static int me4600_ai_query_number_ranges(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_range_info(me_subdevice_t * subdevice,
+static int me4600_ai_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata)
@@ -2317,7 +2317,7 @@ static int me4600_ai_query_range_info(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_timer(me_subdevice_t * subdevice,
+static int me4600_ai_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks)
@@ -2357,7 +2357,7 @@ static int me4600_ai_query_timer(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_ai_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        me4600_ai_subdevice_t *instance;
@@ -2370,7 +2370,7 @@ static int me4600_ai_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_ai_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed. idx=0\n");
@@ -2381,7 +2381,7 @@ static int me4600_ai_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ai_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me4600_ai_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed. idx=0\n");
 
@@ -2426,7 +2426,7 @@ static int me4600_ai_query_subdevice_caps_args(struct me_subdevice *subdevice,
        return err;
 }
 
-void ai_limited_isr(me4600_ai_subdevice_t * instance, const uint32_t irq_status,
+void ai_limited_isr(me4600_ai_subdevice_t *instance, const uint32_t irq_status,
                    const uint32_t ctrl_status)
 {
        int to_read;
@@ -2534,7 +2534,7 @@ void ai_limited_isr(me4600_ai_subdevice_t * instance, const uint32_t irq_status,
        }
 }
 
-void ai_infinite_isr(me4600_ai_subdevice_t * instance,
+void ai_infinite_isr(me4600_ai_subdevice_t *instance,
                     const uint32_t irq_status, const uint32_t ctrl_status)
 {
        int to_read;
@@ -2786,7 +2786,7 @@ static irqreturn_t me4600_ai_isr(int irq, void *dev_id)
 *
 * @param instance The subdevice instance (pointer).
 */
-void inline ai_stop_isr(me4600_ai_subdevice_t * instance)
+inline void ai_stop_isr(me4600_ai_subdevice_t *instance)
 {                              /// @note This is soft time critical function!
        register uint32_t tmp;
 
@@ -2812,7 +2812,7 @@ void inline ai_stop_isr(me4600_ai_subdevice_t * instance)
 * @return On success: Number of copied values.
 * @return On error: -ME_ERRNO_RING_BUFFER_OVERFLOW.
 */
-static int inline ai_read_data(me4600_ai_subdevice_t * instance,
+static inline int ai_read_data(me4600_ai_subdevice_t *instance,
                               const int count)
 {                              /// @note This is time critical function!
        int c = count;
@@ -2858,7 +2858,7 @@ static int inline ai_read_data(me4600_ai_subdevice_t * instance,
        return copied;
 }
 
-void inline ai_infinite_ISM(me4600_ai_subdevice_t * instance)
+inline void ai_infinite_ISM(me4600_ai_subdevice_t *instance)
 {                              /// @note This is time critical function!
        register volatile uint32_t ctrl_set, ctrl_reset, tmp;
 
@@ -2908,7 +2908,7 @@ void inline ai_infinite_ISM(me4600_ai_subdevice_t * instance)
 
 }
 
-void inline ai_limited_ISM(me4600_ai_subdevice_t * instance,
+inline void ai_limited_ISM(me4600_ai_subdevice_t *instance,
                           uint32_t irq_status)
 {                              /// @note This is time critical function!
        register volatile uint32_t ctrl_set, ctrl_reset = 0xFFFFFFFF, tmp;
@@ -2969,7 +2969,7 @@ void inline ai_limited_ISM(me4600_ai_subdevice_t * instance,
 *      Leaving SC_RELOAD doesn't do any harm, but in some bad case can make extra interrupts.
 *      @warning When threshold is wrongly set some IRQ are lost.(!!!)
 */
-void inline ai_reschedule_SC(me4600_ai_subdevice_t * instance)
+inline void ai_reschedule_SC(me4600_ai_subdevice_t *instance)
 {
        register uint32_t rest;
 
@@ -3001,7 +3001,7 @@ void inline ai_reschedule_SC(me4600_ai_subdevice_t * instance)
 }
 
 /** Start the ISM. All must be reseted before enter to this function. */
-void inline ai_data_acquisition_logic(me4600_ai_subdevice_t * instance)
+inline void ai_data_acquisition_logic(me4600_ai_subdevice_t *instance)
 {
        register uint32_t tmp;
 
@@ -3149,7 +3149,7 @@ void inline ai_data_acquisition_logic(me4600_ai_subdevice_t * instance)
        }
 }
 
-static int ai_mux_toggler(me4600_ai_subdevice_t * instance)
+static int ai_mux_toggler(me4600_ai_subdevice_t *instance)
 {
        uint32_t tmp;
 
@@ -3259,7 +3259,7 @@ static int ai_mux_toggler(me4600_ai_subdevice_t * instance)
 * @return On success: Number of copied values.
 * @return On error: Negative error code -ME_ERRNO_RING_BUFFER_OVERFLOW.
 */
-static int inline ai_read_data_pooling(me4600_ai_subdevice_t * instance)
+static inline int ai_read_data_pooling(me4600_ai_subdevice_t *instance)
 {                              /// @note This is time critical function!
        int empty_space;
        int copied = 0;
index fe7ad3a..eb47269 100644 (file)
@@ -38,8 +38,8 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
 #include <linux/types.h>
 #include <linux/version.h>
 #include <linux/interrupt.h>
 /* Defines
  */
 
-static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me4600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range);
 
-static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
+static int me4600_ao_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count);
 
-static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
+static int me4600_ao_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata);
 
-static int me4600_ao_query_timer(me_subdevice_t * subdevice,
+static int me4600_ao_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks);
 
-static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number);
 
-static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_ao_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype);
 
-static int me4600_ao_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me4600_ao_query_subdevice_caps(me_subdevice_t *subdevice,
                                          int *caps);
 
 static int me4600_ao_query_subdevice_caps_args(struct me_subdevice *subdevice,
@@ -105,12 +105,12 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice);
 
 /** Reset subdevice. Stop all actions. Reset registry. Disable FIFO. Set output to 0V and status to 'none'.
 */
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags);
 
 /** Set output as single
 */
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -120,55 +120,55 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
 
 /** Pass to user actual value of output.
 */
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags);
 
 /** Write to output requed value.
 */
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags);
 
 /** Set output as streamed device.
 */
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags);
 
 /** Wait for / Check empty space in buffer.
 */
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags);
 
 /** Start streaming.
 */
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags);
 
 /** Check actual state. / Wait for end.
 */
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags);
 
 /** Stop streaming.
 */
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags);
 
 /** Write datas to buffor.
 */
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int write_mode,
                                     int *values, int *count, int flags);
@@ -178,27 +178,27 @@ static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
 static irqreturn_t me4600_ao_isr(int irq, void *dev_id);
 /** Copy data from circular buffer to fifo (fast) in wraparound mode.
 */
-int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data_wraparound(me4600_ao_subdevice_t *instance, int count,
                                    int start_pos);
 
 /** Copy data from circular buffer to fifo (fast).
 */
-int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data(me4600_ao_subdevice_t *instance, int count,
                         int start_pos);
 
 /** Copy data from circular buffer to fifo (slow).
 */
-int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data_pooling(me4600_ao_subdevice_t *instance, int count,
                                 int start_pos);
 
 /** Copy data from user space to circular buffer.
 */
-int inline ao_get_data_from_user(me4600_ao_subdevice_t * instance, int count,
+inline int ao_get_data_from_user(me4600_ao_subdevice_t *instance, int count,
                                 int *user_values);
 
 /** Stop presentation. Preserve FIFOs.
 */
-int inline ao_stop_immediately(me4600_ao_subdevice_t * instance);
+inline int ao_stop_immediately(me4600_ao_subdevice_t *instance);
 
 /** Task for asynchronical state verifying.
 */
@@ -206,7 +206,7 @@ static void me4600_ao_work_control_task(struct work_struct *work);
 /* Functions
  */
 
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags)
 {
        me4600_ao_subdevice_t *instance;
@@ -280,7 +280,7 @@ static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -453,7 +453,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -537,7 +537,7 @@ static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -979,11 +979,11 @@ static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags)
 {
        me4600_ao_subdevice_t *instance;
@@ -1317,7 +1317,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags)
 {
@@ -1398,7 +1398,7 @@ static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags)
 {
@@ -1835,7 +1835,7 @@ static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags)
@@ -1933,7 +1933,7 @@ static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags)
 {                              // Stop work and empty buffer and FIFO
@@ -2038,7 +2038,7 @@ static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int write_mode,
                                     int *values, int *count, int flags)
@@ -2484,8 +2484,8 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice)
 }
 
 me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
-                                            spinlock_t * preload_reg_lock,
-                                            uint32_t * preload_flags,
+                                            spinlock_t *preload_reg_lock,
+                                            uint32_t *preload_flags,
                                             int ao_idx,
                                             int fifo,
                                             int irq,
@@ -2690,7 +2690,7 @@ me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
 *
 * @param instance The subdevice instance (pointer).
 */
-int inline ao_stop_immediately(me4600_ao_subdevice_t * instance)
+inline int ao_stop_immediately(me4600_ao_subdevice_t *instance)
 {
        unsigned long cpu_flags;
        uint32_t ctrl;
@@ -2743,7 +2743,7 @@ int inline ao_stop_immediately(me4600_ao_subdevice_t * instance)
 * @return On error/success: 0. No datas were copied => no data in buffer.
 * @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
 */
-int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data_wraparound(me4600_ao_subdevice_t *instance, int count,
                                    int start_pos)
 {                              /// @note This is time critical function!
        uint32_t status;
@@ -2808,7 +2808,7 @@ int inline ao_write_data_wraparound(me4600_ao_subdevice_t * instance, int count,
 * @return On error/success: 0. No datas were copied => no data in buffer.
 * @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
 */
-int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data(me4600_ao_subdevice_t *instance, int count,
                         int start_pos)
 {                              /// @note This is time critical function!
        uint32_t status;
@@ -2878,7 +2878,7 @@ int inline ao_write_data(me4600_ao_subdevice_t * instance, int count,
 * @return On error/success: 0. FIFO was full at begining.
 * @return On error: -ME_ERRNO_RING_BUFFER_UNDEFFLOW.
 */
-int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
+inline int ao_write_data_pooling(me4600_ao_subdevice_t *instance, int count,
                                 int start_pos)
 {                              /// @note This is slow function!
        uint32_t status;
@@ -2936,7 +2936,7 @@ int inline ao_write_data_pooling(me4600_ao_subdevice_t * instance, int count,
 * @return On success: Number of copied values.
 * @return On error: -ME_ERRNO_INTERNAL.
 */
-int inline ao_get_data_from_user(me4600_ao_subdevice_t * instance, int count,
+inline int ao_get_data_from_user(me4600_ao_subdevice_t *instance, int count,
                                 int *user_values)
 {
        int i, err;
@@ -3294,7 +3294,7 @@ static void me4600_ao_work_control_task(struct work_struct *work)
 #else
 /// @note SPECIAL BUILD FOR BOSCH
 /// @author Guenter Gebhardt
-static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags)
 {
        me4600_ao_subdevice_t *instance;
@@ -3336,7 +3336,7 @@ static int me4600_ao_io_reset_subdevice(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -3607,7 +3607,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
                goto ERROR;
        }
 
-      ERROR:
+ERROR:
 
        spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
 
@@ -3616,7 +3616,7 @@ static int me4600_ao_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -3653,7 +3653,7 @@ static int me4600_ao_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -3801,18 +3801,18 @@ static int me4600_ao_io_single_write(me_subdevice_t * subdevice,
                spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
        }
 
-      ERROR:
+ERROR:
 
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags)
 {
        me4600_ao_subdevice_t *instance;
@@ -4121,7 +4121,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
        PDEBUG("Ctrl word = 0x%lX.\n", ctrl);
        outl(ctrl, instance->ctrl_reg); // Write the control word
 
-      ERROR:
+ERROR:
 
        spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
 
@@ -4130,7 +4130,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags)
 {
@@ -4209,7 +4209,7 @@ static int me4600_ao_io_stream_new_values(me_subdevice_t * subdevice,
        return err;
 }
 
-static void stop_immediately(me4600_ao_subdevice_t * instance)
+static void stop_immediately(me4600_ao_subdevice_t *instance)
 {
        unsigned long cpu_flags;
        uint32_t tmp;
@@ -4224,7 +4224,7 @@ static void stop_immediately(me4600_ao_subdevice_t * instance)
        spin_unlock_irqrestore(&instance->subdevice_lock, cpu_flags);
 }
 
-static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags)
 {
@@ -4749,14 +4749,14 @@ static int me4600_ao_io_stream_start(me_subdevice_t * subdevice,
                goto ERROR;
        }
 
-      ERROR:
+ERROR:
 
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags)
@@ -4813,14 +4813,14 @@ static int me4600_ao_io_stream_status(me_subdevice_t * subdevice,
                goto ERROR;
        }
 
-      ERROR:
+ERROR:
 
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags)
 {
@@ -4862,14 +4862,14 @@ static int me4600_ao_io_stream_stop(me_subdevice_t * subdevice,
                goto ERROR;
        }
 
-      ERROR:
+ERROR:
 
        ME_SUBDEVICE_EXIT;
 
        return err;
 }
 
-static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
+static int me4600_ao_io_stream_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int write_mode,
                                     int *values, int *count, int flags)
@@ -5403,7 +5403,7 @@ static int me4600_ao_io_stream_write(me_subdevice_t * subdevice,
                goto ERROR;
        }
 
-      ERROR:
+ERROR:
 
        ME_SUBDEVICE_EXIT;
 
@@ -5627,8 +5627,8 @@ static void me4600_ao_destructor(struct me_subdevice *subdevice)
 }
 
 me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
-                                            spinlock_t * preload_reg_lock,
-                                            uint32_t * preload_flags,
+                                            spinlock_t *preload_reg_lock,
+                                            uint32_t *preload_flags,
                                             int ao_idx, int fifo, int irq)
 {
        me4600_ao_subdevice_t *subdevice;
@@ -5790,7 +5790,7 @@ me4600_ao_subdevice_t *me4600_ao_constructor(uint32_t reg_base,
 /* Common functions
 */
 
-static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me4600_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range)
@@ -5825,7 +5825,7 @@ static int me4600_ao_query_range_by_min_max(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
+static int me4600_ao_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count)
 {
        me4600_ao_subdevice_t *instance;
@@ -5843,7 +5843,7 @@ static int me4600_ao_query_number_ranges(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
+static int me4600_ao_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata)
@@ -5867,7 +5867,7 @@ static int me4600_ao_query_range_info(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_timer(me_subdevice_t * subdevice,
+static int me4600_ao_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks)
@@ -5901,7 +5901,7 @@ static int me4600_ao_query_timer(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        me4600_ao_subdevice_t *instance;
@@ -5914,7 +5914,7 @@ static int me4600_ao_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_ao_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        me4600_ao_subdevice_t *instance;
@@ -5929,7 +5929,7 @@ static int me4600_ao_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ao_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me4600_ao_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        me4600_ao_subdevice_t *instance;
        instance = (me4600_ao_subdevice_t *) subdevice;
index fa45584..457666e 100644 (file)
@@ -336,6 +336,7 @@ me_device_t *me4600_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me4600_device;
 }
+EXPORT_SYMBOL(me4600_pci_constructor);
 
 // Init and exit of module.
 
@@ -368,6 +369,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for ME-46xx Devices");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-46xx Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me4600_pci_constructor);
index 7e3c9f4..e107e50 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -91,7 +91,7 @@ static int me4600_di_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_di_io_single_config(me_subdevice_t * subdevice,
+static int me4600_di_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -133,7 +133,7 @@ static int me4600_di_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_di_io_single_read(me_subdevice_t * subdevice,
+static int me4600_di_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -177,7 +177,7 @@ static int me4600_di_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_di_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_di_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -185,7 +185,7 @@ static int me4600_di_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_di_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_di_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -194,7 +194,7 @@ static int me4600_di_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_di_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me4600_di_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = 0;
@@ -202,7 +202,7 @@ static int me4600_di_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
 }
 
 me4600_di_subdevice_t *me4600_di_constructor(uint32_t reg_base,
-                                            spinlock_t * ctrl_reg_lock)
+                                            spinlock_t *ctrl_reg_lock)
 {
        me4600_di_subdevice_t *subdevice;
        int err;
index 0af95d1..baa28ff 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -94,7 +94,7 @@ static int me4600_dio_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_dio_io_single_config(me_subdevice_t * subdevice,
+static int me4600_dio_io_single_config(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int single_config,
@@ -268,7 +268,7 @@ static int me4600_dio_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_dio_io_single_read(me_subdevice_t * subdevice,
+static int me4600_dio_io_single_read(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int *value, int time_out, int flags)
@@ -342,7 +342,7 @@ static int me4600_dio_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_dio_io_single_write(me_subdevice_t * subdevice,
+static int me4600_dio_io_single_write(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int value, int time_out, int flags)
@@ -425,7 +425,7 @@ static int me4600_dio_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_dio_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_dio_query_number_channels(me_subdevice_t *subdevice,
                                            int *number)
 {
        PDEBUG("executed.\n");
@@ -433,7 +433,7 @@ static int me4600_dio_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_dio_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_dio_query_subdevice_type(me_subdevice_t *subdevice,
                                           int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -442,7 +442,7 @@ static int me4600_dio_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_dio_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me4600_dio_query_subdevice_caps(me_subdevice_t *subdevice,
                                           int *caps)
 {
        PDEBUG("executed.\n");
@@ -452,7 +452,7 @@ static int me4600_dio_query_subdevice_caps(me_subdevice_t * subdevice,
 
 me4600_dio_subdevice_t *me4600_dio_constructor(uint32_t reg_base,
                                               unsigned int dio_idx,
-                                              spinlock_t * ctrl_reg_lock)
+                                              spinlock_t *ctrl_reg_lock)
 {
        me4600_dio_subdevice_t *subdevice;
        int err;
index ee591bc..39510f3 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -93,7 +93,7 @@ static int me4600_do_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_do_io_single_config(me_subdevice_t * subdevice,
+static int me4600_do_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -224,7 +224,7 @@ static int me4600_do_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_do_io_single_read(me_subdevice_t * subdevice,
+static int me4600_do_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -284,7 +284,7 @@ static int me4600_do_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_do_io_single_write(me_subdevice_t * subdevice,
+static int me4600_do_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -352,7 +352,7 @@ static int me4600_do_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_do_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_do_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -360,7 +360,7 @@ static int me4600_do_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_do_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_do_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -369,7 +369,7 @@ static int me4600_do_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me4600_do_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = 0;
@@ -377,7 +377,7 @@ static int me4600_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
 }
 
 me4600_do_subdevice_t *me4600_do_constructor(uint32_t reg_base,
-                                            spinlock_t * ctrl_reg_lock)
+                                            spinlock_t *ctrl_reg_lock)
 {
        me4600_do_subdevice_t *subdevice;
        int err;
index 5f37875..6b33cba 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/version.h>
 
@@ -60,7 +60,7 @@
  * Functions
  */
 
-static int me4600_ext_irq_io_irq_start(me_subdevice_t * subdevice,
+static int me4600_ext_irq_io_irq_start(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int irq_source,
@@ -135,7 +135,7 @@ static int me4600_ext_irq_io_irq_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ext_irq_io_irq_wait(me_subdevice_t * subdevice,
+static int me4600_ext_irq_io_irq_wait(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int *irq_count,
@@ -214,7 +214,7 @@ static int me4600_ext_irq_io_irq_wait(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ext_irq_io_irq_stop(me_subdevice_t * subdevice,
+static int me4600_ext_irq_io_irq_stop(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel, int flags)
 {
@@ -256,7 +256,7 @@ static int me4600_ext_irq_io_irq_stop(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me4600_ext_irq_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me4600_ext_irq_io_reset_subdevice(me_subdevice_t *subdevice,
                                             struct file *filep, int flags)
 {
        me4600_ext_irq_subdevice_t *instance;
@@ -308,7 +308,7 @@ static void me4600_ext_irq_destructor(struct me_subdevice *subdevice)
        kfree(instance);
 }
 
-static int me4600_ext_irq_query_number_channels(me_subdevice_t * subdevice,
+static int me4600_ext_irq_query_number_channels(me_subdevice_t *subdevice,
                                                int *number)
 {
        PDEBUG("executed.\n");
@@ -316,7 +316,7 @@ static int me4600_ext_irq_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ext_irq_query_subdevice_type(me_subdevice_t * subdevice,
+static int me4600_ext_irq_query_subdevice_type(me_subdevice_t *subdevice,
                                               int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -325,7 +325,7 @@ static int me4600_ext_irq_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ext_irq_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me4600_ext_irq_query_subdevice_caps(me_subdevice_t *subdevice,
                                               int *caps)
 {
        PDEBUG("executed.\n");
index 1cdf100..f7abdbd 100644 (file)
@@ -36,8 +36,8 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 /* Defines
  */
 
-static int me6000_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me6000_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range);
 
-static int me6000_ao_query_number_ranges(me_subdevice_t * subdevice,
+static int me6000_ao_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count);
 
-static int me6000_ao_query_range_info(me_subdevice_t * subdevice,
+static int me6000_ao_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata);
 
-static int me6000_ao_query_timer(me_subdevice_t * subdevice,
+static int me6000_ao_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks);
 
-static int me6000_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me6000_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number);
 
-static int me6000_ao_query_subdevice_type(me_subdevice_t * subdevice,
+static int me6000_ao_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype);
 
-static int me6000_ao_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me6000_ao_query_subdevice_caps(me_subdevice_t *subdevice,
                                          int *caps);
 
 static int me6000_ao_query_subdevice_caps_args(struct me_subdevice *subdevice,
@@ -91,11 +91,11 @@ static int me6000_ao_query_subdevice_caps_args(struct me_subdevice *subdevice,
 static void me6000_ao_destructor(struct me_subdevice *subdevice);
 
 /** Reset subdevice. Stop all actions. Reset registry. Disable FIFO. Set output to 0V and status to 'none'. */
-static int me6000_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me6000_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags);
 
 /** Set output as single */
-static int me6000_ao_io_single_config(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -104,48 +104,48 @@ static int me6000_ao_io_single_config(me_subdevice_t * subdevice,
                                      int trig_type, int trig_edge, int flags);
 
 /** Pass to user actual value of output. */
-static int me6000_ao_io_single_read(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags);
 
 /** Write to output requed value. */
-static int me6000_ao_io_single_write(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags);
 
 /** Set output as streamed device. */
-static int me6000_ao_io_stream_config(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags);
 
 /** Wait for / Check empty space in buffer. */
-static int me6000_ao_io_stream_new_values(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags);
 
 /** Start streaming. */
-static int me6000_ao_io_stream_start(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags);
 
 /** Check actual state. / Wait for end. */
-static int me6000_ao_io_stream_status(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags);
 
 /** Stop streaming. */
-static int me6000_ao_io_stream_stop(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags);
 
 /** Write datas to buffor. */
-static int me6000_ao_io_stream_write(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int write_mode,
                                     int *values, int *count, int flags);
@@ -154,23 +154,23 @@ static int me6000_ao_io_stream_write(me_subdevice_t * subdevice,
 static irqreturn_t me6000_ao_isr(int irq, void *dev_id);
 
 /** Copy data from circular buffer to fifo (fast) in wraparound mode. */
-int inline ao_write_data_wraparound(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data_wraparound(me6000_ao_subdevice_t *instance, int count,
                                    int start_pos);
 
 /** Copy data from circular buffer to fifo (fast).*/
-int inline ao_write_data(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data(me6000_ao_subdevice_t *instance, int count,
                         int start_pos);
 
 /** Copy data from circular buffer to fifo (slow).*/
-int inline ao_write_data_pooling(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data_pooling(me6000_ao_subdevice_t *instance, int count,
                                 int start_pos);
 
 /** Copy data from user space to circular buffer. */
-int inline ao_get_data_from_user(me6000_ao_subdevice_t * instance, int count,
+inline int ao_get_data_from_user(me6000_ao_subdevice_t *instance, int count,
                                 int *user_values);
 
 /** Stop presentation. Preserve FIFOs. */
-int inline ao_stop_immediately(me6000_ao_subdevice_t * instance);
+inline int ao_stop_immediately(me6000_ao_subdevice_t *instance);
 
 /** Function for checking timeout in non-blocking mode. */
 static void me6000_ao_work_control_task(struct work_struct *work);
@@ -178,7 +178,7 @@ static void me6000_ao_work_control_task(struct work_struct *work);
 /* Functions
  */
 
-static int me6000_ao_io_reset_subdevice(me_subdevice_t * subdevice,
+static int me6000_ao_io_reset_subdevice(me_subdevice_t *subdevice,
                                        struct file *filep, int flags)
 {
        me6000_ao_subdevice_t *instance;
@@ -266,7 +266,7 @@ static int me6000_ao_io_reset_subdevice(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_single_config(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -465,7 +465,7 @@ static int me6000_ao_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_single_read(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -547,7 +547,7 @@ static int me6000_ao_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_single_write(me_subdevice_t * subdevice,
+static int me6000_ao_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -1019,11 +1019,11 @@ static int me6000_ao_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_config(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_config(me_subdevice_t *subdevice,
                                      struct file *filep,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags)
 {
        me6000_ao_subdevice_t *instance;
@@ -1351,7 +1351,7 @@ static int me6000_ao_io_stream_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_new_values(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_new_values(me_subdevice_t *subdevice,
                                          struct file *filep,
                                          int time_out, int *count, int flags)
 {
@@ -1432,7 +1432,7 @@ static int me6000_ao_io_stream_new_values(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_start(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_start(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int start_mode, int time_out, int flags)
 {
@@ -1881,7 +1881,7 @@ static int me6000_ao_io_stream_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_status(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_status(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int wait,
                                      int *status, int *values, int flags)
@@ -1979,7 +1979,7 @@ static int me6000_ao_io_stream_status(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_stop(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_stop(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int stop_mode, int flags)
 {                              /// @note Stop work and empty buffer and FIFO
@@ -2086,7 +2086,7 @@ static int me6000_ao_io_stream_stop(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_ao_io_stream_write(me_subdevice_t * subdevice,
+static int me6000_ao_io_stream_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int write_mode,
                                     int *values, int *count, int flags)
@@ -2532,9 +2532,9 @@ static void me6000_ao_destructor(struct me_subdevice *subdevice)
 }
 
 me6000_ao_subdevice_t *me6000_ao_constructor(uint32_t reg_base,
-                                            spinlock_t * preload_reg_lock,
-                                            uint32_t * preload_flags,
-                                            uint32_t * triggering_flags,
+                                            spinlock_t *preload_reg_lock,
+                                            uint32_t *preload_flags,
+                                            uint32_t *triggering_flags,
                                             int ao_idx,
                                             int fifo,
                                             int irq,
@@ -2800,7 +2800,7 @@ me6000_ao_subdevice_t *me6000_ao_constructor(uint32_t reg_base,
 *
 * @param instance The subdevice instance (pointer).
 */
-int inline ao_stop_immediately(me6000_ao_subdevice_t * instance)
+inline int ao_stop_immediately(me6000_ao_subdevice_t *instance)
 {
        unsigned long cpu_flags;
        uint32_t ctrl;
@@ -2871,7 +2871,7 @@ int inline ao_stop_immediately(me6000_ao_subdevice_t * instance)
 * @return On error/success: 0. No datas were copied => no data in buffer.
 * @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
 */
-int inline ao_write_data_wraparound(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data_wraparound(me6000_ao_subdevice_t *instance, int count,
                                    int start_pos)
 {                              /// @note This is time critical function!
        uint32_t status;
@@ -2936,7 +2936,7 @@ int inline ao_write_data_wraparound(me6000_ao_subdevice_t * instance, int count,
 * @return On error/success: 0. No datas were copied => no data in buffer.
 * @return On error: -ME_ERRNO_FIFO_BUFFER_OVERFLOW.
 */
-int inline ao_write_data(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data(me6000_ao_subdevice_t *instance, int count,
                         int start_pos)
 {                              /// @note This is time critical function!
        uint32_t status;
@@ -3006,7 +3006,7 @@ int inline ao_write_data(me6000_ao_subdevice_t * instance, int count,
 * @return On error/success: 0. FIFO was full at begining.
 * @return On error: -ME_ERRNO_RING_BUFFER_UNDEFFLOW.
 */
-int inline ao_write_data_pooling(me6000_ao_subdevice_t * instance, int count,
+inline int ao_write_data_pooling(me6000_ao_subdevice_t *instance, int count,
                                 int start_pos)
 {                              /// @note This is slow function!
        uint32_t status;
@@ -3064,7 +3064,7 @@ int inline ao_write_data_pooling(me6000_ao_subdevice_t * instance, int count,
 * @return On success: Number of copied values.
 * @return On error: -ME_ERRNO_INTERNAL.
 */
-int inline ao_get_data_from_user(me6000_ao_subdevice_t * instance, int count,
+inline int ao_get_data_from_user(me6000_ao_subdevice_t *instance, int count,
                                 int *user_values)
 {
        int i, err;
@@ -3529,7 +3529,7 @@ static void me6000_ao_work_control_task(struct work_struct *work)
 
 }
 
-static int me6000_ao_query_range_by_min_max(me_subdevice_t * subdevice,
+static int me6000_ao_query_range_by_min_max(me_subdevice_t *subdevice,
                                            int unit,
                                            int *min,
                                            int *max, int *maxdata, int *range)
@@ -3563,7 +3563,7 @@ static int me6000_ao_query_range_by_min_max(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_number_ranges(me_subdevice_t * subdevice,
+static int me6000_ao_query_number_ranges(me_subdevice_t *subdevice,
                                         int unit, int *count)
 {
        me6000_ao_subdevice_t *instance;
@@ -3581,7 +3581,7 @@ static int me6000_ao_query_number_ranges(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_range_info(me_subdevice_t * subdevice,
+static int me6000_ao_query_range_info(me_subdevice_t *subdevice,
                                      int range,
                                      int *unit,
                                      int *min, int *max, int *maxdata)
@@ -3605,7 +3605,7 @@ static int me6000_ao_query_range_info(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_timer(me_subdevice_t * subdevice,
+static int me6000_ao_query_timer(me_subdevice_t *subdevice,
                                 int timer,
                                 int *base_frequency,
                                 long long *min_ticks, long long *max_ticks)
@@ -3634,7 +3634,7 @@ static int me6000_ao_query_timer(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_number_channels(me_subdevice_t * subdevice,
+static int me6000_ao_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        me6000_ao_subdevice_t *instance;
@@ -3646,7 +3646,7 @@ static int me6000_ao_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_subdevice_type(me_subdevice_t * subdevice,
+static int me6000_ao_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        me6000_ao_subdevice_t *instance;
@@ -3664,7 +3664,7 @@ static int me6000_ao_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_ao_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me6000_ao_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        me6000_ao_subdevice_t *instance;
        instance = (me6000_ao_subdevice_t *) subdevice;
index fee4c58..1a6cf7f 100644 (file)
@@ -178,6 +178,7 @@ me_device_t *me6000_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me6000_device;
 }
+EXPORT_SYMBOL(me6000_pci_constructor);
 
 // Init and exit of module.
 
@@ -206,6 +207,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Device Driver Module for ME-6000 Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-6000 Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me6000_pci_constructor);
index 07f1069..c90686e 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -91,7 +91,7 @@ static int me6000_dio_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_dio_io_single_config(me_subdevice_t * subdevice,
+static int me6000_dio_io_single_config(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int single_config,
@@ -161,7 +161,7 @@ static int me6000_dio_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_dio_io_single_read(me_subdevice_t * subdevice,
+static int me6000_dio_io_single_read(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int *value, int time_out, int flags)
@@ -233,7 +233,7 @@ static int me6000_dio_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_dio_io_single_write(me_subdevice_t * subdevice,
+static int me6000_dio_io_single_write(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int value, int time_out, int flags)
@@ -314,7 +314,7 @@ static int me6000_dio_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me6000_dio_query_number_channels(me_subdevice_t * subdevice,
+static int me6000_dio_query_number_channels(me_subdevice_t *subdevice,
                                            int *number)
 {
        PDEBUG("executed.\n");
@@ -322,7 +322,7 @@ static int me6000_dio_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_dio_query_subdevice_type(me_subdevice_t * subdevice,
+static int me6000_dio_query_subdevice_type(me_subdevice_t *subdevice,
                                           int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -331,7 +331,7 @@ static int me6000_dio_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me6000_dio_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me6000_dio_query_subdevice_caps(me_subdevice_t *subdevice,
                                           int *caps)
 {
        PDEBUG("executed.\n");
@@ -341,7 +341,7 @@ static int me6000_dio_query_subdevice_caps(me_subdevice_t * subdevice,
 
 me6000_dio_subdevice_t *me6000_dio_constructor(uint32_t reg_base,
                                               unsigned int dio_idx,
-                                              spinlock_t * ctrl_reg_lock)
+                                              spinlock_t *ctrl_reg_lock)
 {
        me6000_dio_subdevice_t *subdevice;
        int err;
index 1fb79e4..41a9345 100644 (file)
@@ -159,6 +159,7 @@ me_device_t *me8100_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me8100_device;
 }
+EXPORT_SYMBOL(me8100_pci_constructor);
 
 // Init and exit of module.
 
@@ -182,6 +183,3 @@ MODULE_AUTHOR("Guenter Gebhardt <g.gebhardt@meilhaus.de>");
 MODULE_DESCRIPTION("Device Driver Module for Template Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus Template Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me8100_pci_constructor);
index 9b5441a..301dbd8 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/version.h>
@@ -114,7 +114,7 @@ static int me8100_di_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_di_io_irq_start(me_subdevice_t * subdevice,
+static int me8100_di_io_irq_start(me_subdevice_t *subdevice,
                                  struct file *filep,
                                  int channel,
                                  int irq_source,
@@ -208,7 +208,7 @@ static int me8100_di_io_irq_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_di_io_irq_wait(me_subdevice_t * subdevice,
+static int me8100_di_io_irq_wait(me_subdevice_t *subdevice,
                                 struct file *filep,
                                 int channel,
                                 int *irq_count,
@@ -315,7 +315,7 @@ static int me8100_di_io_irq_wait(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_di_io_irq_stop(me_subdevice_t * subdevice,
+static int me8100_di_io_irq_stop(me_subdevice_t *subdevice,
                                 struct file *filep, int channel, int flags)
 {
        me8100_di_subdevice_t *instance;
@@ -358,7 +358,7 @@ static int me8100_di_io_irq_stop(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_di_io_single_config(me_subdevice_t * subdevice,
+static int me8100_di_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -405,7 +405,7 @@ static int me8100_di_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_di_io_single_read(me_subdevice_t * subdevice,
+static int me8100_di_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -466,7 +466,7 @@ static int me8100_di_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_di_query_number_channels(me_subdevice_t * subdevice,
+static int me8100_di_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -474,7 +474,7 @@ static int me8100_di_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_di_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8100_di_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -483,7 +483,7 @@ static int me8100_di_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_di_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me8100_di_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = ME_CAPS_DIO_BIT_PATTERN_IRQ | ME_CAPS_DIO_BIT_MASK_IRQ_EDGE_ANY;
@@ -594,7 +594,7 @@ me8100_di_subdevice_t *me8100_di_constructor(uint32_t me8100_reg_base,
                                             uint32_t plx_reg_base,
                                             unsigned int di_idx,
                                             int irq,
-                                            spinlock_t * ctrl_reg_lock)
+                                            spinlock_t *ctrl_reg_lock)
 {
        me8100_di_subdevice_t *subdevice;
        int err;
index 957b9f9..81651a9 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -92,7 +92,7 @@ static int me8100_do_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_do_io_single_config(me_subdevice_t * subdevice,
+static int me8100_do_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -158,7 +158,7 @@ static int me8100_do_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_do_io_single_read(me_subdevice_t * subdevice,
+static int me8100_do_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -215,7 +215,7 @@ static int me8100_do_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_do_io_single_write(me_subdevice_t * subdevice,
+static int me8100_do_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -297,7 +297,7 @@ static int me8100_do_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8100_do_query_number_channels(me_subdevice_t * subdevice,
+static int me8100_do_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -305,7 +305,7 @@ static int me8100_do_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_do_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8100_do_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -314,7 +314,7 @@ static int me8100_do_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me8100_do_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = ME_CAPS_DIO_SINK_SOURCE;
@@ -323,7 +323,7 @@ static int me8100_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
 
 me8100_do_subdevice_t *me8100_do_constructor(uint32_t reg_base,
                                             unsigned int do_idx,
-                                            spinlock_t * ctrl_reg_lock)
+                                            spinlock_t *ctrl_reg_lock)
 {
        me8100_do_subdevice_t *subdevice;
        int err;
index 261c0cb..b313679 100644 (file)
@@ -166,6 +166,7 @@ me_device_t *me8200_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) me8200_device;
 }
+EXPORT_SYMBOL(me8200_pci_constructor);
 
 // Init and exit of module.
 
@@ -189,6 +190,3 @@ MODULE_AUTHOR("Guenter Gebhardt <g.gebhardt@meilhaus.de>");
 MODULE_DESCRIPTION("Device Driver Module for Template Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus Template Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(me8200_pci_constructor);
index 6cd75ea..a931fb8 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/version.h>
 
 /// Defines
 static void me8200_di_destructor(struct me_subdevice *subdevice);
-static int me8200_di_io_irq_start(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_start(me_subdevice_t *subdevice,
                                  struct file *filep,
                                  int channel,
                                  int irq_source,
                                  int irq_edge, int irq_arg, int flags);
-static int me8200_di_io_irq_wait(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_wait(me_subdevice_t *subdevice,
                                 struct file *filep,
                                 int channel,
                                 int *irq_count,
                                 int *value, int time_out, int flags);
-static int me8200_di_io_irq_stop(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_stop(me_subdevice_t *subdevice,
                                 struct file *filep, int channel, int flags);
-static int me8200_di_io_single_config(me_subdevice_t * subdevice,
+static int me8200_di_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
                                      int ref,
                                      int trig_chan,
                                      int trig_type, int trig_edge, int flags);
-static int me8200_di_io_single_read(me_subdevice_t * subdevice,
+static int me8200_di_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags);
 static int me8200_di_io_reset_subdevice(struct me_subdevice *subdevice,
                                        struct file *filep, int flags);
-static int me8200_di_query_number_channels(me_subdevice_t * subdevice,
+static int me8200_di_query_number_channels(me_subdevice_t *subdevice,
                                           int *number);
-static int me8200_di_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8200_di_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype);
-static int me8200_di_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me8200_di_query_subdevice_caps(me_subdevice_t *subdevice,
                                          int *caps);
 static irqreturn_t me8200_isr(int irq, void *dev_id);
 static irqreturn_t me8200_isr_EX(int irq, void *dev_id);
-static void me8200_di_check_version(me8200_di_subdevice_t * instance,
+static void me8200_di_check_version(me8200_di_subdevice_t *instance,
                                    unsigned long addr);
 
 ///Functions
-static int me8200_di_io_irq_start(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_start(me_subdevice_t *subdevice,
                                  struct file *filep,
                                  int channel,
                                  int irq_source,
@@ -238,7 +238,7 @@ static int me8200_di_io_irq_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_di_io_irq_wait(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_wait(me_subdevice_t *subdevice,
                                 struct file *filep,
                                 int channel,
                                 int *irq_count,
@@ -344,7 +344,7 @@ static int me8200_di_io_irq_wait(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_di_io_irq_stop(me_subdevice_t * subdevice,
+static int me8200_di_io_irq_stop(me_subdevice_t *subdevice,
                                 struct file *filep, int channel, int flags)
 {
        me8200_di_subdevice_t *instance;
@@ -398,7 +398,7 @@ static int me8200_di_io_irq_stop(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_di_io_single_config(me_subdevice_t * subdevice,
+static int me8200_di_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -445,7 +445,7 @@ static int me8200_di_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_di_io_single_read(me_subdevice_t * subdevice,
+static int me8200_di_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -510,7 +510,7 @@ static int me8200_di_io_reset_subdevice(struct me_subdevice *subdevice,
        return me8200_di_io_irq_stop(subdevice, filep, 0, 0);
 }
 
-static int me8200_di_query_number_channels(me_subdevice_t * subdevice,
+static int me8200_di_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -518,7 +518,7 @@ static int me8200_di_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_di_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8200_di_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -527,7 +527,7 @@ static int me8200_di_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_di_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me8200_di_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps =
@@ -699,8 +699,8 @@ static void me8200_di_destructor(struct me_subdevice *subdevice)
 me8200_di_subdevice_t *me8200_di_constructor(uint32_t me8200_regbase,
                                             unsigned int di_idx,
                                             int irq,
-                                            spinlock_t * irq_ctrl_lock,
-                                            spinlock_t * irq_mode_lock)
+                                            spinlock_t *irq_ctrl_lock,
+                                            spinlock_t *irq_mode_lock)
 {
        me8200_di_subdevice_t *subdevice;
        int err;
@@ -827,7 +827,7 @@ me8200_di_subdevice_t *me8200_di_constructor(uint32_t me8200_regbase,
        return subdevice;
 }
 
-static void me8200_di_check_version(me8200_di_subdevice_t * instance,
+static void me8200_di_check_version(me8200_di_subdevice_t *instance,
                                    unsigned long addr)
 {
 
index ff8ca1b..c7f43f0 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -90,7 +90,7 @@ static int me8200_dio_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_dio_io_single_config(me_subdevice_t * subdevice,
+static int me8200_dio_io_single_config(me_subdevice_t *subdevice,
                                       struct file *filep,
                                       int channel,
                                       int single_config,
@@ -164,7 +164,7 @@ static int me8200_dio_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_dio_io_single_read(me_subdevice_t * subdevice,
+static int me8200_dio_io_single_read(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int *value, int time_out, int flags)
@@ -241,7 +241,7 @@ static int me8200_dio_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_dio_io_single_write(me_subdevice_t * subdevice,
+static int me8200_dio_io_single_write(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int value, int time_out, int flags)
@@ -332,7 +332,7 @@ static int me8200_dio_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_dio_query_number_channels(me_subdevice_t * subdevice,
+static int me8200_dio_query_number_channels(me_subdevice_t *subdevice,
                                            int *number)
 {
        PDEBUG("executed.\n");
@@ -340,7 +340,7 @@ static int me8200_dio_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_dio_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8200_dio_query_subdevice_type(me_subdevice_t *subdevice,
                                           int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -349,7 +349,7 @@ static int me8200_dio_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_dio_query_subdevice_caps(me_subdevice_t * subdevice,
+static int me8200_dio_query_subdevice_caps(me_subdevice_t *subdevice,
                                           int *caps)
 {
        PDEBUG("executed.\n");
@@ -359,7 +359,7 @@ static int me8200_dio_query_subdevice_caps(me_subdevice_t * subdevice,
 
 me8200_dio_subdevice_t *me8200_dio_constructor(uint32_t reg_base,
                                               unsigned int dio_idx,
-                                              spinlock_t * ctrl_reg_lock)
+                                              spinlock_t *ctrl_reg_lock)
 {
        me8200_dio_subdevice_t *subdevice;
        int err;
index eb04fdd..40d536c 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 #include <linux/version.h>
 
@@ -59,7 +59,7 @@
  * Functions
  */
 
-static int me8200_do_io_irq_start(me_subdevice_t * subdevice,
+static int me8200_do_io_irq_start(me_subdevice_t *subdevice,
                                  struct file *filep,
                                  int channel,
                                  int irq_source,
@@ -109,7 +109,7 @@ static int me8200_do_io_irq_start(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_do_io_irq_wait(me_subdevice_t * subdevice,
+static int me8200_do_io_irq_wait(me_subdevice_t *subdevice,
                                 struct file *filep,
                                 int channel,
                                 int *irq_count,
@@ -184,7 +184,7 @@ static int me8200_do_io_irq_wait(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_do_io_irq_stop(me_subdevice_t * subdevice,
+static int me8200_do_io_irq_stop(me_subdevice_t *subdevice,
                                 struct file *filep, int channel, int flags)
 {
        me8200_do_subdevice_t *instance;
@@ -262,7 +262,7 @@ static int me8200_do_io_reset_subdevice(struct me_subdevice *subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_do_io_single_config(me_subdevice_t * subdevice,
+static int me8200_do_io_single_config(me_subdevice_t *subdevice,
                                      struct file *filep,
                                      int channel,
                                      int single_config,
@@ -307,7 +307,7 @@ static int me8200_do_io_single_config(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_do_io_single_read(me_subdevice_t * subdevice,
+static int me8200_do_io_single_read(me_subdevice_t *subdevice,
                                    struct file *filep,
                                    int channel,
                                    int *value, int time_out, int flags)
@@ -354,7 +354,7 @@ static int me8200_do_io_single_read(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_do_io_single_write(me_subdevice_t * subdevice,
+static int me8200_do_io_single_write(me_subdevice_t *subdevice,
                                     struct file *filep,
                                     int channel,
                                     int value, int time_out, int flags)
@@ -415,7 +415,7 @@ static int me8200_do_io_single_write(me_subdevice_t * subdevice,
        return err;
 }
 
-static int me8200_do_query_number_channels(me_subdevice_t * subdevice,
+static int me8200_do_query_number_channels(me_subdevice_t *subdevice,
                                           int *number)
 {
        PDEBUG("executed.\n");
@@ -423,7 +423,7 @@ static int me8200_do_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_do_query_subdevice_type(me_subdevice_t * subdevice,
+static int me8200_do_query_subdevice_type(me_subdevice_t *subdevice,
                                          int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -432,7 +432,7 @@ static int me8200_do_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8200_do_query_subdevice_caps(me_subdevice_t * subdevice, int *caps)
+static int me8200_do_query_subdevice_caps(me_subdevice_t *subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        *caps = ME_CAPS_DIO_OVER_TEMP_IRQ;
@@ -501,7 +501,7 @@ static irqreturn_t me8200_do_isr(int irq, void *dev_id)
 me8200_do_subdevice_t *me8200_do_constructor(uint32_t reg_base,
                                             unsigned int do_idx,
                                             int irq,
-                                            spinlock_t * irq_mode_lock)
+                                            spinlock_t *irq_mode_lock)
 {
        me8200_do_subdevice_t *subdevice;
        int err;
index 6e44c3d..d8f742a 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -183,7 +183,7 @@ static int me8254_io_reset_subdevice(struct me_subdevice *subdevice,
        return err;
 }
 
-static int me1400_ab_ref_config(me8254_subdevice_t * instance, int ref)
+static int me1400_ab_ref_config(me8254_subdevice_t *instance, int ref)
 {
        uint8_t clk_src;
 
@@ -291,7 +291,7 @@ static int me1400_ab_ref_config(me8254_subdevice_t * instance, int ref)
        return ME_ERRNO_SUCCESS;
 }
 
-static int me1400_cd_ref_config(me8254_subdevice_t * instance, int ref)
+static int me1400_cd_ref_config(me8254_subdevice_t *instance, int ref)
 {
        uint8_t clk_src;
 
@@ -436,7 +436,7 @@ static int me1400_cd_ref_config(me8254_subdevice_t * instance, int ref)
        return ME_ERRNO_SUCCESS;
 }
 
-static int me4600_ref_config(me8254_subdevice_t * instance, int ref)
+static int me4600_ref_config(me8254_subdevice_t *instance, int ref)
 {
        switch (ref) {
 
@@ -453,7 +453,7 @@ static int me4600_ref_config(me8254_subdevice_t * instance, int ref)
        return ME_ERRNO_SUCCESS;
 }
 
-static int me8100_ref_config(me8254_subdevice_t * instance, int ref)
+static int me8100_ref_config(me8254_subdevice_t *instance, int ref)
 {
        switch (ref) {
 
@@ -962,8 +962,8 @@ me8254_subdevice_t *me8254_constructor(uint32_t device_id,
                                       uint32_t reg_base,
                                       unsigned int me8254_idx,
                                       unsigned int ctr_idx,
-                                      spinlock_t * ctrl_reg_lock,
-                                      spinlock_t * clk_src_reg_lock)
+                                      spinlock_t *ctrl_reg_lock,
+                                      spinlock_t *clk_src_reg_lock)
 {
        me8254_subdevice_t *subdevice;
        int err;
index 180e7f8..ec9c638 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -318,7 +318,7 @@ me8255_subdevice_t *me8255_constructor(uint32_t device_id,
                                       unsigned int me8255_idx,
                                       unsigned int dio_idx,
                                       int *ctrl_reg_mirror,
-                                      spinlock_t * ctrl_reg_lock)
+                                      spinlock_t *ctrl_reg_lock)
 {
        me8255_subdevice_t *subdevice;
        int err;
index e9b591e..5166585 100644 (file)
@@ -40,19 +40,19 @@ typedef struct me_circ_buf {
        int volatile tail;
 } me_circ_buf_t;
 
-static int inline me_circ_buf_values(me_circ_buf_t * buf)
+static inline int me_circ_buf_values(me_circ_buf_t * buf)
 {
 //      return ((buf->head - buf->tail) & (buf->count - 1));
        return ((buf->head - buf->tail) & (buf->mask));
 }
 
-static int inline me_circ_buf_space(me_circ_buf_t * buf)
+static inline int me_circ_buf_space(me_circ_buf_t * buf)
 {
 //      return ((buf->tail - (buf->head + 1)) & (buf->count - 1));
        return ((buf->tail - (buf->head + 1)) & (buf->mask));
 }
 
-static int inline me_circ_buf_values_to_end(me_circ_buf_t * buf)
+static inline int me_circ_buf_values_to_end(me_circ_buf_t * buf)
 {
        int end;
        int n;
@@ -63,7 +63,7 @@ static int inline me_circ_buf_values_to_end(me_circ_buf_t * buf)
        return (n < end) ? n : end;
 }
 
-static int inline me_circ_buf_space_to_end(me_circ_buf_t * buf)
+static inline int me_circ_buf_space_to_end(me_circ_buf_t * buf)
 {
        int end;
        int n;
@@ -99,19 +99,19 @@ typedef struct me_circ_buf_16b {
 #   endif //_CBUFF_32b_t
 
 /** How many values is in buffer */
-static int inline me_circ_buf_values(me_circ_buf_t * buf)
+static inline int me_circ_buf_values(me_circ_buf_t * buf)
 {
        return ((buf->head - buf->tail) & (buf->mask));
 }
 
 /** How many space left */
-static int inline me_circ_buf_space(me_circ_buf_t * buf)
+static inline int me_circ_buf_space(me_circ_buf_t * buf)
 {
        return ((buf->tail - (buf->head + 1)) & (buf->mask));
 }
 
 /** How many values can be read from buffor in one chunck. */
-static int inline me_circ_buf_values_to_end(me_circ_buf_t * buf)
+static inline int me_circ_buf_values_to_end(me_circ_buf_t * buf)
 {
        return (buf->tail <=
                buf->head) ? (buf->head - buf->tail) : (buf->mask - buf->tail +
@@ -119,7 +119,7 @@ static int inline me_circ_buf_values_to_end(me_circ_buf_t * buf)
 }
 
 /** How many values can be write to buffer in one chunck. */
-static int inline me_circ_buf_space_to_end(me_circ_buf_t * buf)
+static inline int me_circ_buf_space_to_end(me_circ_buf_t * buf)
 {
        return (buf->tail <=
                buf->head) ? (buf->mask - buf->head + 1) : (buf->tail -
index 8f62e16..75aaec0 100644 (file)
@@ -390,9 +390,9 @@ static int me_device_io_single_write(struct me_device *device,
 static int me_device_io_stream_config(struct me_device *device,
                                      struct file *filep,
                                      int subdevice,
-                                     meIOStreamConfig_t * config_list,
+                                     meIOStreamConfig_t *config_list,
                                      int count,
-                                     meIOStreamTrigger_t * trigger,
+                                     meIOStreamTrigger_t *trigger,
                                      int fifo_irq_threshold, int flags)
 {
        int err = ME_ERRNO_SUCCESS;
@@ -1040,7 +1040,7 @@ static int me_device_query_timer(struct me_device *device,
                                 int subdevice,
                                 int timer,
                                 int *base_frequency,
-                                uint64_t * min_ticks, uint64_t * max_ticks)
+                                uint64_t *min_ticks, uint64_t *max_ticks)
 {
        int err = ME_ERRNO_SUCCESS;
        me_subdevice_t *s;
@@ -1082,14 +1082,14 @@ static int me_device_query_version_device_driver(struct me_device *device,
 }
 
 static int me_device_config_load(struct me_device *device, struct file *filep,
-                                me_cfg_device_entry_t * config)
+                                me_cfg_device_entry_t *config)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_SUCCESS;        //If no need for config return success.
 //      return ME_ERRNO_NOT_SUPPORTED;
 }
 
-static void me_device_destructor(me_device_t * me_device)
+static void me_device_destructor(me_device_t *me_device)
 {
        PDEBUG("executed.\n");
        me_device_deinit(me_device);
@@ -1581,7 +1581,7 @@ static int get_device_descriptions(uint16_t device_id,
        return 0;
 }
 
-int me_device_pci_init(me_device_t * me_device, struct pci_dev *pci_device)
+int me_device_pci_init(me_device_t *me_device, struct pci_dev *pci_device)
 {
        int err;
        int i;
@@ -1720,7 +1720,7 @@ int me_device_pci_init(me_device_t * me_device, struct pci_dev *pci_device)
        return 1;
 }
 
-void me_device_deinit(me_device_t * me_device)
+void me_device_deinit(me_device_t *me_device)
 {
        PDEBUG("executed.\n");
 
index ef4e369..b6a4065 100644 (file)
@@ -69,7 +69,7 @@ me_device_t *me_dlist_get_device(struct me_dlist * dlist, unsigned int index)
        return device;
 }
 
-void me_dlist_add_device_tail(struct me_dlist *dlist, me_device_t * device)
+void me_dlist_add_device_tail(struct me_dlist *dlist, me_device_t *device)
 {
        PDEBUG_LOCKS("called.\n");
 
@@ -99,7 +99,7 @@ me_device_t *me_dlist_del_device_tail(struct me_dlist *dlist)
        return device;
 }
 
-int me_dlist_init(me_dlist_t * dlist)
+int me_dlist_init(me_dlist_t *dlist)
 {
        PDEBUG_LOCKS("called.\n");
 
@@ -108,7 +108,7 @@ int me_dlist_init(me_dlist_t * dlist)
        return 0;
 }
 
-void me_dlist_deinit(me_dlist_t * dlist)
+void me_dlist_deinit(me_dlist_t *dlist)
 {
 
        struct list_head *s;
index f649e3d..8ded397 100644 (file)
@@ -65,7 +65,7 @@ int me_dlock_exit(struct me_dlock *dlock, struct file *filep)
 }
 
 int me_dlock_lock(struct me_dlock *dlock,
-                 struct file *filep, int lock, int flags, me_slist_t * slist)
+                 struct file *filep, int lock, int flags, me_slist_t *slist)
 {
        int err = ME_ERRNO_SUCCESS;
        int i;
@@ -183,7 +183,7 @@ void me_dlock_deinit(struct me_dlock *dlock)
        PDEBUG_LOCKS("executed.\n");
 }
 
-int me_dlock_init(me_dlock_t * dlock)
+int me_dlock_init(me_dlock_t *dlock)
 {
        PDEBUG_LOCKS("executed.\n");
 
index 6a9f08d..2423745 100644 (file)
@@ -47,7 +47,7 @@
 
 #include "medummy.h"
 
-static int medummy_io_irq_start(me_device_t * device,
+static int medummy_io_irq_start(me_device_t *device,
                                struct file *filep,
                                int subdevice,
                                int channel,
@@ -58,7 +58,7 @@ static int medummy_io_irq_start(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_irq_wait(me_device_t * device,
+static int medummy_io_irq_wait(me_device_t *device,
                               struct file *filep,
                               int subdevice,
                               int channel,
@@ -69,7 +69,7 @@ static int medummy_io_irq_wait(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_irq_stop(me_device_t * device,
+static int medummy_io_irq_stop(me_device_t *device,
                               struct file *filep,
                               int subdevice, int channel, int flags)
 {
@@ -77,14 +77,14 @@ static int medummy_io_irq_stop(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_reset_device(me_device_t * device,
+static int medummy_io_reset_device(me_device_t *device,
                                   struct file *filep, int flags)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_reset_subdevice(me_device_t * device,
+static int medummy_io_reset_subdevice(me_device_t *device,
                                      struct file *filep,
                                      int subdevice, int flags)
 {
@@ -92,7 +92,7 @@ static int medummy_io_reset_subdevice(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_single_config(me_device_t * device,
+static int medummy_io_single_config(me_device_t *device,
                                    struct file *filep,
                                    int subdevice,
                                    int channel,
@@ -105,7 +105,7 @@ static int medummy_io_single_config(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_single_read(me_device_t * device,
+static int medummy_io_single_read(me_device_t *device,
                                  struct file *filep,
                                  int subdevice,
                                  int channel,
@@ -115,7 +115,7 @@ static int medummy_io_single_read(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_single_write(me_device_t * device,
+static int medummy_io_single_write(me_device_t *device,
                                   struct file *filep,
                                   int subdevice,
                                   int channel,
@@ -125,19 +125,19 @@ static int medummy_io_single_write(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_config(me_device_t * device,
+static int medummy_io_stream_config(me_device_t *device,
                                    struct file *filep,
                                    int subdevice,
-                                   meIOStreamConfig_t * config_list,
+                                   meIOStreamConfig_t *config_list,
                                    int count,
-                                   meIOStreamTrigger_t * trigger,
+                                   meIOStreamTrigger_t *trigger,
                                    int fifo_irq_threshold, int flags)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_new_values(me_device_t * device,
+static int medummy_io_stream_new_values(me_device_t *device,
                                        struct file *filep,
                                        int subdevice,
                                        int timeout, int *count, int flags)
@@ -146,7 +146,7 @@ static int medummy_io_stream_new_values(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_read(me_device_t * device,
+static int medummy_io_stream_read(me_device_t *device,
                                  struct file *filep,
                                  int subdevice,
                                  int read_mode,
@@ -156,7 +156,7 @@ static int medummy_io_stream_read(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_start(me_device_t * device,
+static int medummy_io_stream_start(me_device_t *device,
                                   struct file *filep,
                                   int subdevice,
                                   int start_mode, int time_out, int flags)
@@ -165,7 +165,7 @@ static int medummy_io_stream_start(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_status(me_device_t * device,
+static int medummy_io_stream_status(me_device_t *device,
                                    struct file *filep,
                                    int subdevice,
                                    int wait,
@@ -175,7 +175,7 @@ static int medummy_io_stream_status(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_stop(me_device_t * device,
+static int medummy_io_stream_stop(me_device_t *device,
                                  struct file *filep,
                                  int subdevice, int stop_mode, int flags)
 {
@@ -183,7 +183,7 @@ static int medummy_io_stream_stop(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_io_stream_write(me_device_t * device,
+static int medummy_io_stream_write(me_device_t *device,
                                   struct file *filep,
                                   int subdevice,
                                   int write_mode,
@@ -193,14 +193,14 @@ static int medummy_io_stream_write(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_lock_device(me_device_t * device,
+static int medummy_lock_device(me_device_t *device,
                               struct file *filep, int lock, int flags)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_lock_subdevice(me_device_t * device,
+static int medummy_lock_subdevice(me_device_t *device,
                                  struct file *filep,
                                  int subdevice, int lock, int flags)
 {
@@ -208,7 +208,7 @@ static int medummy_lock_subdevice(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_description_device(me_device_t * device,
+static int medummy_query_description_device(me_device_t *device,
                                            char **description)
 {
        medummy_device_t *instance = (medummy_device_t *) device;
@@ -602,7 +602,7 @@ static int medummy_query_description_device(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_info_device(me_device_t * device,
+static int medummy_query_info_device(me_device_t *device,
                                     int *vendor_id,
                                     int *device_id,
                                     int *serial_no,
@@ -632,14 +632,14 @@ static int medummy_query_info_device(me_device_t * device,
        return ME_ERRNO_SUCCESS;
 }
 
-static int medummy_query_name_device_driver(me_device_t * device, char **name)
+static int medummy_query_name_device_driver(me_device_t *device, char **name)
 {
        PDEBUG("executed.\n");
        *name = MEDUMMY_NAME_DRIVER;
        return ME_ERRNO_SUCCESS;
 }
 
-static int medummy_query_name_device(me_device_t * device, char **name)
+static int medummy_query_name_device(me_device_t *device, char **name)
 {
        medummy_device_t *instance = (medummy_device_t *) device;
 
@@ -1012,41 +1012,41 @@ static int medummy_query_name_device(me_device_t * device, char **name)
        return ME_ERRNO_SUCCESS;
 }
 
-static int medummy_query_number_subdevices(me_device_t * device, int *number)
+static int medummy_query_number_subdevices(me_device_t *device, int *number)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_number_channels(me_device_t * device,
+static int medummy_query_number_channels(me_device_t *device,
                                         int subdevice, int *number)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_number_ranges(me_device_t * device,
+static int medummy_query_number_ranges(me_device_t *device,
                                       int subdevice, int unit, int *count)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_subdevice_type(me_device_t * device,
+static int medummy_query_subdevice_type(me_device_t *device,
                                        int subdevice, int *type, int *subtype)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_subdevice_caps(me_device_t * device,
+static int medummy_query_subdevice_caps(me_device_t *device,
                                        int subdevice, int *caps)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_subdevice_caps_args(me_device_t * device,
+static int medummy_query_subdevice_caps_args(me_device_t *device,
                                             int subdevice,
                                             int cap, int *args, int count)
 {
@@ -1054,7 +1054,7 @@ static int medummy_query_subdevice_caps_args(me_device_t * device,
        return ME_ERRNO_NOT_SUPPORTED;
 }
 
-static int medummy_query_subdevice_by_type(me_device_t * device,
+static int medummy_query_subdevice_by_type(me_device_t *device,
                                           int start_subdevice,
                                           int type,
                                           int subtype, int *subdevice)
@@ -1063,7 +1063,7 @@ static int medummy_query_subdevice_by_type(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_range_by_min_max(me_device_t * device,
+static int medummy_query_range_by_min_max(me_device_t *device,
                                          int subdevice,
                                          int unit,
                                          int *min,
@@ -1073,7 +1073,7 @@ static int medummy_query_range_by_min_max(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_range_info(me_device_t * device,
+static int medummy_query_range_info(me_device_t *device,
                                    int subdevice,
                                    int range,
                                    int *unit, int *min, int *max, int *maxdata)
@@ -1082,17 +1082,17 @@ static int medummy_query_range_info(me_device_t * device,
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-int medummy_query_timer(me_device_t * device,
+int medummy_query_timer(me_device_t *device,
                        int subdevice,
                        int timer,
                        int *base_frequency,
-                       uint64_t * min_ticks, uint64_t * max_ticks)
+                       uint64_t *min_ticks, uint64_t *max_ticks)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_DEVICE_UNPLUGGED;
 }
 
-static int medummy_query_version_device_driver(me_device_t * device,
+static int medummy_query_version_device_driver(me_device_t *device,
                                               int *version)
 {
        PDEBUG("executed.\n");
@@ -1101,7 +1101,7 @@ static int medummy_query_version_device_driver(me_device_t * device,
        return ME_ERRNO_SUCCESS;
 }
 
-static void medummy_destructor(me_device_t * device)
+static void medummy_destructor(me_device_t *device)
 {
        PDEBUG("executed.\n");
        kfree(device);
@@ -1113,7 +1113,7 @@ static int init_device_info(unsigned short vendor_id,
                            int bus_type,
                            int bus_no,
                            int dev_no,
-                           int func_no, medummy_device_t * instance)
+                           int func_no, medummy_device_t *instance)
 {
        PDEBUG("executed.\n");
 
@@ -1129,14 +1129,14 @@ static int init_device_info(unsigned short vendor_id,
        return 0;
 }
 
-static int medummy_config_load(me_device_t * device, struct file *filep,
-                              me_cfg_device_entry_t * config)
+static int medummy_config_load(me_device_t *device, struct file *filep,
+                              me_cfg_device_entry_t *config)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_SUCCESS;
 }
 
-static int init_device_instance(me_device_t * device)
+static int init_device_instance(me_device_t *device)
 {
        PDEBUG("executed.\n");
 
@@ -1238,6 +1238,7 @@ me_device_t *medummy_constructor(unsigned short vendor_id,
 
        return (me_device_t *) instance;
 }
+EXPORT_SYMBOL(medummy_constructor);
 
 // Init and exit of module.
 
@@ -1261,6 +1262,3 @@ MODULE_AUTHOR("Guenter Gebhardt <g.gebhardt@meilhaus.de>");
 MODULE_DESCRIPTION("Device Driver Module for Meilhaus ME-DUMMY Devices");
 MODULE_SUPPORTED_DEVICE("Meilhaus ME-DUMMY Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(medummy_constructor);
index 66bb4ec..fd9f079 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/pci.h>
 //#include <linux/usb.h>
 #include <linux/errno.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/cdev.h>
 #include <linux/rwsem.h>
 
@@ -56,6 +56,7 @@
 
 #ifdef BOSCH
 static unsigned int me_bosch_fw = 0;
+EXPORT_SYMBOL(me_bosch_fw);
 
 # ifdef module_param
 module_param(me_bosch_fw, int, S_IRUGO);
@@ -90,7 +91,7 @@ LIST_HEAD(me_device_list);
 
 static int me_probe_pci(struct pci_dev *dev, const struct pci_device_id *id);
 static void me_remove_pci(struct pci_dev *dev);
-static int insert_to_device_list(me_device_t * n_device);
+static int insert_to_device_list(me_device_t *n_device);
 static int replace_with_dummy(int vendor_id, int device_id, int serial_no);
 static void clear_device_list(void);
 static int me_open(struct inode *inode_ptr, struct file *filep);
@@ -472,7 +473,7 @@ static int me_probe_pci(struct pci_dev *dev, const struct pci_device_id *id)
        return ME_ERRNO_SUCCESS;
 }
 
-static void release_instance(me_device_t * device)
+static void release_instance(me_device_t *device)
 {
        int vendor_id;
        int device_id;
@@ -517,7 +518,7 @@ static void release_instance(me_device_t * device)
        }
 }
 
-static int insert_to_device_list(me_device_t * n_device)
+static int insert_to_device_list(me_device_t *n_device)
 {
        me_device_t *o_device = NULL;
 
@@ -762,7 +763,7 @@ static int lock_driver(struct file *filep, int lock, int flags)
        return err;
 }
 
-static int me_lock_driver(struct file *filep, me_lock_driver_t * arg)
+static int me_lock_driver(struct file *filep, me_lock_driver_t *arg)
 {
        int err = 0;
 
@@ -807,7 +808,7 @@ static int me_release(struct inode *inode_ptr, struct file *filep)
 }
 
 static int me_query_version_main_driver(struct file *filep,
-                                       me_query_version_main_driver_t * arg)
+                                       me_query_version_main_driver_t *arg)
 {
        int err;
        me_query_version_main_driver_t karg;
@@ -828,7 +829,7 @@ static int me_query_version_main_driver(struct file *filep,
 }
 
 static int me_config_load_device(struct file *filep,
-                                me_cfg_device_entry_t * karg, int device_no)
+                                me_cfg_device_entry_t *karg, int device_no)
 {
 
        int err = ME_ERRNO_SUCCESS;
@@ -874,7 +875,7 @@ static int me_config_load_device(struct file *filep,
        return err;
 }
 
-static int me_config_load(struct file *filep, me_config_load_t * arg)
+static int me_config_load(struct file *filep, me_config_load_t *arg)
 {
        int err;
        int i;
@@ -1170,7 +1171,7 @@ static int me_config_load(struct file *filep, me_config_load_t * arg)
        return 0;
 }
 
-static int me_io_stream_start(struct file *filep, me_io_stream_start_t * arg)
+static int me_io_stream_start(struct file *filep, me_io_stream_start_t *arg)
 {
        int err;
        int i, k;
@@ -1292,7 +1293,7 @@ static int me_io_stream_start(struct file *filep, me_io_stream_start_t * arg)
        return err;
 }
 
-static int me_io_single(struct file *filep, me_io_single_t * arg)
+static int me_io_single(struct file *filep, me_io_single_t *arg)
 {
        int err;
        int i, k;
@@ -1448,7 +1449,7 @@ static int me_io_single(struct file *filep, me_io_single_t * arg)
        return err;
 }
 
-static int me_io_stream_config(struct file *filep, me_io_stream_config_t * arg)
+static int me_io_stream_config(struct file *filep, me_io_stream_config_t *arg)
 {
        int err;
        int k = 0;
@@ -1540,7 +1541,7 @@ static int me_io_stream_config(struct file *filep, me_io_stream_config_t * arg)
 }
 
 static int me_query_number_devices(struct file *filep,
-                                  me_query_number_devices_t * arg)
+                                  me_query_number_devices_t *arg)
 {
        int err;
        me_query_number_devices_t karg;
@@ -1569,7 +1570,7 @@ static int me_query_number_devices(struct file *filep,
        return 0;
 }
 
-static int me_io_stream_stop(struct file *filep, me_io_stream_stop_t * arg)
+static int me_io_stream_stop(struct file *filep, me_io_stream_stop_t *arg)
 {
        int err;
        int i, k;
@@ -2015,8 +2016,3 @@ MODULE_AUTHOR
 MODULE_DESCRIPTION("Central module for Meilhaus Driver System.");
 MODULE_SUPPORTED_DEVICE("Meilhaus PCI/cPCI boards.");
 MODULE_LICENSE("GPL");
-
-#ifdef BOSCH
-// Export the flag for the BOSCH firmware.
-EXPORT_SYMBOL(me_bosch_fw);
-#endif // BOSCH
index 7e8b66c..ce49114 100644 (file)
@@ -115,7 +115,7 @@ int me_slist_get_subdevice_by_type(struct me_slist *slist,
 }
 
 void me_slist_add_subdevice_tail(struct me_slist *slist,
-                                me_subdevice_t * subdevice)
+                                me_subdevice_t *subdevice)
 {
        PDEBUG_LOCKS("called.\n");
 
@@ -145,7 +145,7 @@ me_subdevice_t *me_slist_del_subdevice_tail(struct me_slist *slist)
        return subdevice;
 }
 
-int me_slist_init(me_slist_t * slist)
+int me_slist_init(me_slist_t *slist)
 {
        PDEBUG_LOCKS("called.\n");
 
@@ -154,7 +154,7 @@ int me_slist_init(me_slist_t * slist)
        return 0;
 }
 
-void me_slist_deinit(me_slist_t * slist)
+void me_slist_deinit(me_slist_t *slist)
 {
 
        struct list_head *s;
index 5230b89..abcdb4a 100644 (file)
@@ -124,7 +124,7 @@ void me_slock_deinit(struct me_slock *slock)
        PDEBUG_LOCKS("executed.\n");
 }
 
-int me_slock_init(me_slock_t * slock)
+int me_slock_init(me_slock_t *slock)
 {
        PDEBUG_LOCKS("executed.\n");
 
index 98d4f1f..b2e9567 100644 (file)
@@ -101,9 +101,9 @@ static int me_subdevice_io_single_write(struct me_subdevice *subdevice,
 
 static int me_subdevice_io_stream_config(struct me_subdevice *subdevice,
                                         struct file *filep,
-                                        meIOStreamConfig_t * config_list,
+                                        meIOStreamConfig_t *config_list,
                                         int count,
-                                        meIOStreamTrigger_t * trigger,
+                                        meIOStreamTrigger_t *trigger,
                                         int fifo_irq_threshold, int flags)
 {
        PDEBUG("executed.\n");
@@ -162,7 +162,7 @@ static int me_subdevice_io_stream_write(struct me_subdevice *subdevice,
        return ME_ERRNO_NOT_SUPPORTED;
 }
 
-static int me_subdevice_lock_subdevice(me_subdevice_t * subdevice,
+static int me_subdevice_lock_subdevice(me_subdevice_t *subdevice,
                                       struct file *filep, int lock, int flags)
 {
        PDEBUG("executed.\n");
@@ -235,7 +235,7 @@ static int me_subdevice_query_timer(struct me_subdevice *subdevice,
 }
 
 static int me_subdevice_config_load(struct me_subdevice *subdevice,
-                                   me_cfg_device_entry_t * config)
+                                   me_cfg_device_entry_t *config)
 {
        PDEBUG("executed.\n");
        return ME_ERRNO_SUCCESS;
@@ -248,7 +248,7 @@ static void me_subdevice_destructor(struct me_subdevice *subdevice)
        kfree(subdevice);
 }
 
-int me_subdevice_init(me_subdevice_t * subdevice)
+int me_subdevice_init(me_subdevice_t *subdevice)
 {
        int err;
 
@@ -308,7 +308,7 @@ int me_subdevice_init(me_subdevice_t * subdevice)
        return 0;
 }
 
-void me_subdevice_deinit(me_subdevice_t * subdevice)
+void me_subdevice_deinit(me_subdevice_t *subdevice)
 {
        PDEBUG("executed.\n");
        me_subdevice_io_reset_subdevice(subdevice, NULL,
index e48632d..bdaf6df 100644 (file)
@@ -109,6 +109,7 @@ me_device_t *metempl_pci_constructor(struct pci_dev *pci_device)
 
        return (me_device_t *) metempl_device;
 }
+EXPORT_SYMBOL(metempl_pci_constructor);
 
 // Init and exit of module.
 
@@ -132,6 +133,3 @@ MODULE_AUTHOR("Guenter Gebhardt <g.gebhardt@meilhaus.de>");
 MODULE_DESCRIPTION("Device Driver Module for Template Device");
 MODULE_SUPPORTED_DEVICE("Meilhaus Template Devices");
 MODULE_LICENSE("GPL");
-
-// Export the constructor.
-EXPORT_SYMBOL(metempl_pci_constructor);
index f1d65d8..b5a6a97 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <linux/slab.h>
 #include <linux/spinlock.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/types.h>
 
 #include "medefines.h"
@@ -68,7 +68,7 @@ static void metempl_sub_destructor(struct me_subdevice *subdevice)
        kfree(instance);
 }
 
-static int metempl_sub_query_number_channels(me_subdevice_t * subdevice,
+static int metempl_sub_query_number_channels(me_subdevice_t *subdevice,
                                             int *number)
 {
        PDEBUG("executed.\n");
@@ -76,7 +76,7 @@ static int metempl_sub_query_number_channels(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int metempl_sub_query_subdevice_type(me_subdevice_t * subdevice,
+static int metempl_sub_query_subdevice_type(me_subdevice_t *subdevice,
                                            int *type, int *subtype)
 {
        PDEBUG("executed.\n");
@@ -85,7 +85,7 @@ static int metempl_sub_query_subdevice_type(me_subdevice_t * subdevice,
        return ME_ERRNO_SUCCESS;
 }
 
-static int metempl_sub_query_subdevice_caps(me_subdevice_t * subdevice,
+static int metempl_sub_query_subdevice_caps(me_subdevice_t *subdevice,
                                            int *caps)
 {
        PDEBUG("executed.\n");
@@ -95,7 +95,7 @@ static int metempl_sub_query_subdevice_caps(me_subdevice_t * subdevice,
 
 metempl_sub_subdevice_t *metempl_sub_constructor(uint32_t reg_base,
                                                 unsigned int sub_idx,
-                                                spinlock_t * ctrl_reg_lock)
+                                                spinlock_t *ctrl_reg_lock)
 {
        metempl_sub_subdevice_t *subdevice;
        int err;