Module: xenomai-forge
Branch: next
Commit: 8d0f9bc9937b68436031f662768f56bf2d68d974
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8d0f9bc9937b68436031f662768f56bf2d68d974

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Sep 18 11:53:58 2014 +0200

cobalt/rtdm: drop redundant information from rtdm_device_class

Convert .provider_name to MODULE_AUTHOR(), .peripheral_name to
MODULE_DESCRIPTION() and .driver_version to MODULE_VERSION()
respectively, if not already present.

Drop .driver_name entirely as it brings no information we could not
get from reading the module name.

---

 include/cobalt/kernel/rtdm/driver.h     |   32 +++----------------------------
 include/cobalt/kernel/rtdm/udd.h        |   11 +----------
 kernel/cobalt/posix/memory.c            |    8 --------
 kernel/cobalt/rtdm/proc.c               |   22 ++++++---------------
 kernel/cobalt/trace/cobalt-rtdm.h       |    6 ++----
 kernel/drivers/analogy/rtdm_interface.c |   11 ++++-------
 kernel/drivers/autotune/autotune.c      |   19 +++++-------------
 kernel/drivers/can/rtcan_raw.c          |   25 +++++++++++-------------
 kernel/drivers/ipc/rtipc.c              |   10 ++++------
 kernel/drivers/serial/16550A.c          |   12 +++++-------
 kernel/drivers/serial/mpc52xx_uart.c    |    6 ++----
 kernel/drivers/serial/rt_imx_uart.c     |   13 +++++--------
 kernel/drivers/testing/rtdmtest.c       |    8 +++-----
 kernel/drivers/testing/switchtest.c     |   12 +++++-------
 kernel/drivers/testing/timerbench.c     |   12 +++++-------
 kernel/drivers/udd/udd.c                |    9 ---------
 16 files changed, 61 insertions(+), 155 deletions(-)

diff --git a/include/cobalt/kernel/rtdm/driver.h 
b/include/cobalt/kernel/rtdm/driver.h
index 9a0ace5..1366746 100644
--- a/include/cobalt/kernel/rtdm/driver.h
+++ b/include/cobalt/kernel/rtdm/driver.h
@@ -27,6 +27,7 @@
 
 #include <asm/atomic.h>
 #include <linux/list.h>
+#include <linux/module.h>
 #include <linux/cdev.h>
 #include <xenomai/version.h>
 #include <cobalt/kernel/heap.h>
@@ -83,26 +84,6 @@ enum rtdm_selecttype;
 #define RTDM_SECURE_DEVICE             0x80000000
 /** @} Device Flags */
 
-/*!
- * @anchor drv_versioning @name Driver Versioning
- * Encoding of driver versions. See
- * @ref rtdm_api_versioning "API Versioning" for the interface revision.
- * @{
- */
-/** Version code constructor for driver revisions */
-#define RTDM_DRIVER_VER(major, minor, patch) \
-       (((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF))
-
-/** Get major version number from driver revision code */
-#define RTDM_DRIVER_MAJOR_VER(ver)     (((ver) >> 16) & 0xFF)
-
-/** Get minor version number from driver revision code */
-#define RTDM_DRIVER_MINOR_VER(ver)     (((ver) >> 8) & 0xFF)
-
-/** Get patch version number from driver revision code */
-#define RTDM_DRIVER_PATCH_VER(ver)     ((ver) & 0xFF)
-/** @} Driver Versioning */
-
 /** @} rtdm_device_register */
 
 /*!
@@ -231,6 +212,7 @@ struct rtdm_profile_info {
        int version;
        /** Reserved */
        unsigned int magic;
+       struct module *owner;
 };     
 
 /**
@@ -253,15 +235,6 @@ struct rtdm_device_class {
        int protocol_family;
        /** Protocol device identification: socket type (SOCK_xxx) */
        int socket_type;
-       /** Informational driver name (reported via /proc) */
-       const char *driver_name;
-       /** Driver version, see @ref drv_versioning "Driver Versioning" macros 
*/
-       int driver_version;
-       /** Informational peripheral name the device is attached to
-        *  (reported via /proc) */
-       const char *peripheral_name;
-       /** Informational driver provider name (reported via /proc) */
-       const char *provider_name;
        /** I/O operation handlers */
        struct rtdm_fd_ops ops;
        /**
@@ -309,6 +282,7 @@ struct rtdm_device_class {
        .subclass_id = (__subid),                               \
        .version = (__version),                                 \
        .magic = ~RTDM_CLASS_MAGIC,                             \
+       .owner = THIS_MODULE,                                   \
 }
 
 /**
diff --git a/include/cobalt/kernel/rtdm/udd.h b/include/cobalt/kernel/rtdm/udd.h
index 780c373..8fc4715 100644
--- a/include/cobalt/kernel/rtdm/udd.h
+++ b/include/cobalt/kernel/rtdm/udd.h
@@ -191,7 +191,7 @@ struct udd_memregion {
 struct udd_device {
        /**
         * Name of the device managed by the mini-driver, appears
-        * automatically in the /dev namespace upon creation.
+        * automatically in the /dev/rtdm namespace upon creation.
         */
        const char *device_name;
        /**
@@ -200,21 +200,12 @@ struct udd_device {
         */
        int device_flags;
        /**
-        * Textual description of the device managed by the
-        * mini-driver.
-        */
-       const char *device_description;
-       /**
         * Subclass code of the device managed by the mini-driver (see
         * RTDM_SUBCLASS_xxx definition in the @ref rtdm_profiles
         * "Device Profiles"). The main class code is forced to
         * RTDM_CLASS_UDD.
         */
        int device_subclass;
-       /** @ref drv_versioning "Driver version. */
-       int driver_version;
-       /** Driver author/provider (exposed via /proc/xenomai/rtdm) */
-       const char *driver_author;
        struct {
                /**
                 * Ancillary open() handler, optional. See
diff --git a/kernel/cobalt/posix/memory.c b/kernel/cobalt/posix/memory.c
index 7a5047d..5f97f59 100644
--- a/kernel/cobalt/posix/memory.c
+++ b/kernel/cobalt/posix/memory.c
@@ -219,10 +219,6 @@ static struct rtdm_device_class umm = {
                .mmap                   =       umm_mmap,
                .get_unmapped_area      =       umm_get_unmapped_area,
        },
-       .driver_name            =       "memdev",
-       .driver_version         =       RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        =       "User-mapped heap",
-       .provider_name          =       "Philippe Gerum <r...@xenomai.org>",
 };
 
 static struct rtdm_device umm_devices[] = {
@@ -249,10 +245,6 @@ static struct rtdm_device_class sysmem = {
                .ioctl_rt       =       sysmem_ioctl_rt,
                .ioctl_nrt      =       sysmem_ioctl_nrt,
        },
-       .driver_name            =       "memdev",
-       .driver_version         =       RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        =       "System memory heap",
-       .provider_name          =       "Philippe Gerum <r...@xenomai.org>",
 };
 
 static struct rtdm_device sysmem_device = {
diff --git a/kernel/cobalt/rtdm/proc.c b/kernel/cobalt/rtdm/proc.c
index 52f6d8d..dbc582f 100644
--- a/kernel/cobalt/rtdm/proc.c
+++ b/kernel/cobalt/rtdm/proc.c
@@ -74,7 +74,7 @@ static void *named_begin(struct xnvfile_regular_iterator *it)
 
        if (pos == 1)
                /* Output the header once, only if some device follows. */
-               xnvfile_puts(it, "Name\t\t\t\tDriver\n");
+               xnvfile_printf(it, "%-20s  %s\n", "NODE", "CLASS");
 
        return priv->curr;
 }
@@ -83,8 +83,8 @@ static int named_show(struct xnvfile_regular_iterator *it, 
void *data)
 {
        struct rtdm_device *device = data;
 
-       xnvfile_printf(it, "%-31s\t%-15s\n", device->name,
-               device->class->driver_name);
+       xnvfile_printf(it, "%-20s  %s\n",
+                      device->name, device->class->profile_info.name);
 
        return 0;
 }
@@ -130,7 +130,7 @@ static void *proto_begin(struct xnvfile_regular_iterator 
*it)
 
        if (pos == 1)
                /* Output the header once, only if some device follows. */
-               xnvfile_puts(it, "Name\t\t\t\tDriver\n");
+               xnvfile_printf(it, "%-12s  %s\n", "NODE", "CLASS");
 
        return priv->curr;
 }
@@ -144,9 +144,8 @@ static int proto_show(struct xnvfile_regular_iterator *it, 
void *data)
        ksformat(pnum, sizeof(pnum), "%u:%u",
                 class->protocol_family, class->socket_type);
 
-       xnvfile_printf(it, "%-31s\t%-15s\t%s\n",
-                      pnum, class->driver_name,
-                      device->name);
+       xnvfile_printf(it, "%-12s  %s\n",
+                      pnum, class->profile_info.name);
        return 0;
 }
 
@@ -276,15 +275,6 @@ static int devinfo_vfile_show(struct 
xnvfile_regular_iterator *it, void *data)
 found:
        class = device->class;
 
-       xnvfile_printf(it, "driver:\t\t%s\nversion:\t%d.%d.%d\n",
-                      class->driver_name,
-                      RTDM_DRIVER_MAJOR_VER(class->driver_version),
-                      RTDM_DRIVER_MINOR_VER(class->driver_version),
-                      RTDM_DRIVER_PATCH_VER(class->driver_version));
-
-       xnvfile_printf(it, "peripheral:\t%s\nprovider:\t%s\n",
-                      class->peripheral_name, class->provider_name);
-
        xnvfile_printf(it, "class:\t\t%d\nsub-class:\t%d\n",
                       class->profile_info.class_id,
                       class->profile_info.subclass_id);
diff --git a/kernel/cobalt/trace/cobalt-rtdm.h 
b/kernel/cobalt/trace/cobalt-rtdm.h
index 4ca71ef..7c63b9b 100644
--- a/kernel/cobalt/trace/cobalt-rtdm.h
+++ b/kernel/cobalt/trace/cobalt-rtdm.h
@@ -156,7 +156,6 @@ TRACE_EVENT(cobalt_device_register,
                __field(int, class_id)
                __field(int, subclass_id)
                __field(int, profile_version)
-               __field(int, driver_version)
        ),
 
        TP_fast_assign(
@@ -166,13 +165,12 @@ TRACE_EVENT(cobalt_device_register,
                __entry->class_id = device->class->device_class;
                __entry->subclass_id = device->class->device_sub_class;
                __entry->profile_version = device->class->profile_version;
-               __entry->driver_version = device->class->driver_version;
        ),
 
-       TP_printk("%s device %s=%p version=%d flags=0x%x, class=%d.%d 
profile=%d",
+       TP_printk("%s device %s=%p flags=0x%x, class=%d.%d profile=%d",
                  (__entry->flags & RTDM_DEVICE_TYPE_MASK)
                  == RTDM_NAMED_DEVICE ? "named" : "protocol",
-                 __get_str(device_name), __entry->device, 
__entry->driver_version,
+                 __get_str(device_name), __entry->device,
                  __entry->flags, __entry->class_id, __entry->subclass_id,
                  __entry->profile_version)
 );
diff --git a/kernel/drivers/analogy/rtdm_interface.c 
b/kernel/drivers/analogy/rtdm_interface.c
index 926ee52..fcabb81 100644
--- a/kernel/drivers/analogy/rtdm_interface.c
+++ b/kernel/drivers/analogy/rtdm_interface.c
@@ -26,6 +26,10 @@
 #include <rtdm/driver.h>
 #include <rtdm/analogy/device.h>
 
+MODULE_AUTHOR("Alexis Berlemont");
+MODULE_DESCRIPTION("Analogy core driver");
+MODULE_LICENSE("GPL");
+
 int (* const a4l_ioctl_functions[]) (struct a4l_device_context *, void *) = {
        [_IOC_NR(A4L_DEVCFG)] = a4l_ioctl_devcfg,
        [_IOC_NR(A4L_DEVINFO)] = a4l_ioctl_devinfo,
@@ -232,10 +236,6 @@ static struct rtdm_device_class analogy = {
                .write_nrt =    a4l_write,
                .select =       a4l_rt_select,
        },
-       .driver_name =          "analogy",
-       .driver_version =       RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name =      "Analogy",
-       .provider_name =        "Alexis Berlemont",
 };
 
 static struct rtdm_device rtdm_devs[A4L_NB_DEVICES] = {
@@ -270,9 +270,6 @@ void a4l_unregister(void)
                rtdm_dev_unregister(&(rtdm_devs[i]), 1000);
 }
 
-MODULE_DESCRIPTION("Analogy");
-MODULE_LICENSE("GPL");
-
 static int __init a4l_init(void)
 {
        int ret;
diff --git a/kernel/drivers/autotune/autotune.c 
b/kernel/drivers/autotune/autotune.c
index c407038..fc14cdf 100644
--- a/kernel/drivers/autotune/autotune.c
+++ b/kernel/drivers/autotune/autotune.c
@@ -17,13 +17,16 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <cobalt/kernel/arith.h>
 #include <rtdm/driver.h>
 #include <rtdm/autotune.h>
 
+/*
+ * Auto-tuning services for the Cobalt core clock.  This driver is
+ * always built statically into the kernel when enabled.
+ */
 #define AUTOTUNE_STEPS  60
 #define ONE_SECOND     1000000000UL
 #define H2G2_FACTOR(g) ((g) * 4 / 5)   /* 42 would be too pessimistic */
@@ -642,10 +645,6 @@ static struct rtdm_device_class autotune = {
                .ioctl_nrt      =       autotune_ioctl_nrt,
                .close          =       autotune_close,
        },
-       .driver_name            =       "autotune",
-       .driver_version         =       RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        =       "Auto-tuning services",
-       .provider_name          =       "Philippe Gerum <r...@xenomai.org>",
 };
 
 static struct rtdm_device device = {
@@ -655,18 +654,10 @@ static struct rtdm_device device = {
 
 static int __init autotune_init(void)
 {
-       int ret;
-
        if (!realtime_core_enabled())
                return 0;
 
-       ret = rtdm_dev_register(&device);
-       if (ret)
-               return ret;
-
-       return 0;
+       return rtdm_dev_register(&device);
 }
 
 device_initcall(autotune_init);
-
-MODULE_LICENSE("GPL");
diff --git a/kernel/drivers/can/rtcan_raw.c b/kernel/drivers/can/rtcan_raw.c
index 17e19f1..975c980 100644
--- a/kernel/drivers/can/rtcan_raw.c
+++ b/kernel/drivers/can/rtcan_raw.c
@@ -36,6 +36,7 @@
 
 #include <linux/module.h>
 #include <linux/delay.h>
+#include <linux/stringify.h>
 
 #include <rtdm/driver.h>
 
@@ -57,6 +58,9 @@
 
 MODULE_AUTHOR("RT-Socket-CAN Development Team");
 MODULE_DESCRIPTION("RTDM CAN raw socket device driver");
+MODULE_VERSION(__stringify(RTCAN_MAJOR_VER)
+              __stringify(RTCAN_MINOR_VER)
+              __stringify(RTCAN_BUGFIX_VER));
 MODULE_LICENSE("GPL");
 
 void rtcan_tx_push(struct rtcan_device *dev, struct rtcan_socket *sock,
@@ -127,8 +131,7 @@ static void rtcan_rcv_deliver(struct rtcan_recv 
*recv_listener,
     } else {
        /* Overflow of socket's ring buffer! */
        sock->rx_buf_full++;
-       RTCAN_RTDM_DBG("%s: socket buffer overflow, message discarded\n",
-                      rtcan_proto_raw.driver_name);
+       RTCAN_RTDM_DBG("rtcan: socket buffer overflow, message discarded\n");
     }
 
     rtdm_fd_unlock(fd);
@@ -976,8 +979,8 @@ ssize_t rtcan_raw_sendmsg(struct rtdm_fd *fd,
 }
 
 
-static struct rtdm_device_class rtcan_proto_raw = {
-       .profile_info           = RTDM_PROFILE_INFO(rtcan_proto_raw,
+static struct rtdm_device_class rtcan = {
+       .profile_info           = RTDM_PROFILE_INFO(rtcan,
                                                    RTDM_CLASS_CAN,
                                                    RTDM_SUBCLASS_GENERIC,
                                                    RTCAN_PROFILE_VER),
@@ -994,27 +997,21 @@ static struct rtdm_device_class rtcan_proto_raw = {
                .recvmsg_rt     = rtcan_raw_recvmsg,
                .sendmsg_rt     = rtcan_raw_sendmsg,
        },
-       .driver_name            = "rtcan",
-       .driver_version         = RTDM_DRIVER_VER(RTCAN_MAJOR_VER,
-                                                 RTCAN_MINOR_VER,
-                                                 RTCAN_BUGFIX_VER),
-       .peripheral_name        = "Real-Time CAN Raw Socket Interface",
-       .provider_name          = "RT-Socket-CAN development team",
 };
 
-static struct rtdm_device rtcan_proto_raw_dev = {
-       .class = &rtcan_proto_raw,
+static struct rtdm_device rtcan_device = {
+       .class = &rtcan,
        .label = "rtcan",
 };
 
 int __init rtcan_raw_proto_register(void)
 {
-    return rtdm_dev_register(&rtcan_proto_raw_dev);
+    return rtdm_dev_register(&rtcan_device);
 }
 
 void __exit rtcan_raw_proto_unregister(void)
 {
-    rtdm_dev_unregister(&rtcan_proto_raw_dev, 1000);
+    rtdm_dev_unregister(&rtcan_device, 1000);
 }
 
 
diff --git a/kernel/drivers/ipc/rtipc.c b/kernel/drivers/ipc/rtipc.c
index e64c22f..36c3d2a 100644
--- a/kernel/drivers/ipc/rtipc.c
+++ b/kernel/drivers/ipc/rtipc.c
@@ -24,6 +24,10 @@
 #include <rtdm/ipc.h>
 #include "internal.h"
 
+MODULE_DESCRIPTION("Real-time IPC interface");
+MODULE_AUTHOR("Philippe Gerum <r...@xenomai.org>");
+MODULE_LICENSE("GPL");
+
 static struct rtipc_protocol *protocols[IPCPROTO_MAX] = {
 #ifdef CONFIG_XENO_DRIVERS_RTIPC_XDDP
        [IPCPROTO_XDDP - 1] = &xddp_proto_driver,
@@ -277,10 +281,6 @@ static struct rtdm_device_class rtipc = {
                .write_nrt      =       NULL,
                .select         =       rtipc_select,
        },
-       .driver_name            =       "rtipc",
-       .driver_version         =       RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        =       "Real-time IPC interface",
-       .provider_name          =       "Philippe Gerum <r...@xenomai.org>",
 };
 
 static struct rtdm_device device = {
@@ -323,5 +323,3 @@ void __exit __rtipc_exit(void)
 
 module_init(__rtipc_init);
 module_exit(__rtipc_exit);
-
-MODULE_LICENSE("GPL");
diff --git a/kernel/drivers/serial/16550A.c b/kernel/drivers/serial/16550A.c
index 2d78c78..c1b9381 100644
--- a/kernel/drivers/serial/16550A.c
+++ b/kernel/drivers/serial/16550A.c
@@ -25,6 +25,11 @@
 #include <rtdm/serial.h>
 #include <rtdm/driver.h>
 
+MODULE_DESCRIPTION("RTDM-based driver for 16550A UARTs");
+MODULE_AUTHOR("Jan Kiszka <jan.kis...@web.de>");
+MODULE_VERSION("1.5.2");
+MODULE_LICENSE("GPL");
+
 #define RT_16550_DRIVER_NAME   "xeno_16550A"
 
 #define MAX_DEVICES            8
@@ -135,9 +140,6 @@ MODULE_PARM_DESC(baud_base, "Maximum baud rate of the 
serial device "
                 "(internal clock rate / 16)");
 MODULE_PARM_DESC(tx_fifo, "Transmitter FIFO size");
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("jan.kis...@web.de");
-
 #include "16550A_io.h"
 #include "16550A_pnp.h"
 #include "16550A_pci.h"
@@ -1080,10 +1082,6 @@ static struct rtdm_device_class uart16550A = {
                .read_rt        = rt_16550_read,
                .write_rt       = rt_16550_write,
        },
-       .driver_name            = RT_16550_DRIVER_NAME,
-       .driver_version         = RTDM_DRIVER_VER(1, 5, 2),
-       .peripheral_name        = "UART 16550A",
-       .provider_name          = "Jan Kiszka",
 };
 
 void rt_16550_exit(void);
diff --git a/kernel/drivers/serial/mpc52xx_uart.c 
b/kernel/drivers/serial/mpc52xx_uart.c
index 8386f35..a633b1a 100644
--- a/kernel/drivers/serial/mpc52xx_uart.c
+++ b/kernel/drivers/serial/mpc52xx_uart.c
@@ -29,7 +29,9 @@
 #include <rtdm/serial.h>
 #include <rtdm/driver.h>
 
+MODULE_DESCRIPTION("RTDM-based driver for MPC52xx UARTs");
 MODULE_AUTHOR("Wolfgang Grandegger <w...@denx.de>");
+MODULE_VERSION("1.0.0");
 MODULE_LICENSE("GPL");
 
 #define RT_MPC52XX_UART_DRVNAM "xeno_mpc52xx_uart"
@@ -1248,10 +1250,6 @@ static struct rtdm_device_class mpc52xx_uart = {
                .read_rt        = rt_mpc52xx_uart_read,
                .write_rt       = rt_mpc52xx_uart_write,
        },
-       .driver_name            = RT_MPC52XX_UART_DRVNAM,
-       .driver_version         = RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        = "MPC52xx UART",
-       .provider_name          = "Wolfgang Grandegger",
 };
 
 static int rt_mpc52xx_uart_of_probe(struct platform_device *op)
diff --git a/kernel/drivers/serial/rt_imx_uart.c 
b/kernel/drivers/serial/rt_imx_uart.c
index af7e903..dd99703 100644
--- a/kernel/drivers/serial/rt_imx_uart.c
+++ b/kernel/drivers/serial/rt_imx_uart.c
@@ -42,6 +42,11 @@
 #include <rtdm/serial.h>
 #include <rtdm/driver.h>
 
+MODULE_AUTHOR("Wolfgang Grandegger <w...@denx.de>");
+MODULE_DESCRIPTION("RTDM-based driver for IMX UARTs");
+MODULE_VERSION("1.0.0");
+MODULE_LICENSE("GPL");
+
 #define DRIVER_NAME    "xeno_imx_uart"
 
 /* Register definitions */
@@ -1375,10 +1380,6 @@ static struct rtdm_device imx_uart = {
                .read_rt        = rt_imx_uart_read,
                .write_rt       = rt_imx_uart_write,
        },
-       .driver_name            = DRIVER_NAME,
-       .driver_version         = RTDM_DRIVER_VER(1, 0, 0),
-       .peripheral_name        = "IMX UART",
-       .provider_name          = "Wolfgang Grandegger",
 };
 
 static int rt_imx_uart_probe(struct platform_device *pdev)
@@ -1535,7 +1536,3 @@ static void __exit rt_imx_uart_exit(void)
 
 module_init(rt_imx_uart_init);
 module_exit(rt_imx_uart_exit);
-
-MODULE_AUTHOR("Wolfgang Grandegger <w...@denx.de>");
-MODULE_DESCRIPTION("IMX RTserial port driver");
-MODULE_LICENSE("GPL");
diff --git a/kernel/drivers/testing/rtdmtest.c 
b/kernel/drivers/testing/rtdmtest.c
index 79a174e..b62c70d 100644
--- a/kernel/drivers/testing/rtdmtest.c
+++ b/kernel/drivers/testing/rtdmtest.c
@@ -21,8 +21,10 @@
 #include <rtdm/driver.h>
 #include <rtdm/testing.h>
 
+MODULE_DESCRIPTION("RTDM test helper module");
+MODULE_AUTHOR("Jan Kiszka <jan.kis...@web.de>");
+MODULE_VERSION("0.1.0");
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("jan.kis...@web.de");
 
 struct rtdm_test_context {
        rtdm_timer_t close_timer;
@@ -114,10 +116,6 @@ static struct rtdm_device_class rtdmtest = {
                .ioctl_rt       = rtdm_test_ioctl,
                .ioctl_nrt      = rtdm_test_ioctl,
        },
-       .driver_name            = "rtdmtest",
-       .driver_version         = RTDM_DRIVER_VER(0, 1, 0),
-       .peripheral_name        = "RTDM unit test",
-       .provider_name          = "Jan Kiszka",
 };
 
 static struct rtdm_device device[2] = {
diff --git a/kernel/drivers/testing/switchtest.c 
b/kernel/drivers/testing/switchtest.c
index 0bb5981..e4db1b9 100644
--- a/kernel/drivers/testing/switchtest.c
+++ b/kernel/drivers/testing/switchtest.c
@@ -26,6 +26,11 @@
 #include <rtdm/driver.h>
 #include <asm/xenomai/fptest.h>
 
+MODULE_DESCRIPTION("Cobalt context switch test helper");
+MODULE_AUTHOR("Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>");
+MODULE_VERSION("0.1.1");
+MODULE_LICENSE("GPL");
+
 #define RTSWITCH_RT      0x10000
 #define RTSWITCH_NRT     0
 #define RTSWITCH_KERNEL  0x20000
@@ -59,9 +64,6 @@ struct rtswitch_context {
 
 static int fp_features;
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("gilles.chanteperd...@laposte.net");
-
 static int report(const char *fmt, ...)
 {
        va_list ap;
@@ -729,10 +731,6 @@ static struct rtdm_device_class switchtest = {
                .ioctl_rt = rtswitch_ioctl_rt,
                .ioctl_nrt = rtswitch_ioctl_nrt,
        },
-       .driver_name = "switchtest",
-       .driver_version = RTDM_DRIVER_VER(0, 1, 1),
-       .peripheral_name = "Context Switch Test",
-       .provider_name = "Gilles Chanteperdrix",
 };
 
 static struct rtdm_device device = {
diff --git a/kernel/drivers/testing/timerbench.c 
b/kernel/drivers/testing/timerbench.c
index bec6f8c..767533a 100644
--- a/kernel/drivers/testing/timerbench.c
+++ b/kernel/drivers/testing/timerbench.c
@@ -24,6 +24,11 @@
 #include <rtdm/testing.h>
 #include <rtdm/driver.h>
 
+MODULE_DESCRIPTION("Timer latency test helper");
+MODULE_AUTHOR("Jan Kiszka <jan.kis...@web.de>");
+MODULE_VERSION("0.2.1");
+MODULE_LICENSE("GPL");
+
 struct rt_tmbench_context {
        int mode;
        unsigned long period;
@@ -50,9 +55,6 @@ struct rt_tmbench_context {
        struct semaphore nrt_mutex;
 };
 
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("jan.kis...@web.de");
-
 static inline void add_histogram(struct rt_tmbench_context *ctx,
                                 long *histogram, long addval)
 {
@@ -462,10 +464,6 @@ static struct rtdm_device_class timerbench = {
                .ioctl_rt       = rt_tmbench_ioctl_rt,
                .ioctl_nrt      = rt_tmbench_ioctl_nrt,
        },
-       .driver_name            = "timerbench",
-       .driver_version         = RTDM_DRIVER_VER(0, 2, 1),
-       .peripheral_name        = "Timer Latency Benchmark",
-       .provider_name          = "Jan Kiszka",
 };
 
 static struct rtdm_device device = {
diff --git a/kernel/drivers/udd/udd.c b/kernel/drivers/udd/udd.c
index 59420b9..f201f14 100644
--- a/kernel/drivers/udd/udd.c
+++ b/kernel/drivers/udd/udd.c
@@ -298,11 +298,6 @@ static inline int register_mapper(struct udd_device *udd)
                .close          =       mapper_close,
                .mmap           =       mapper_mmap,
        };
-       class->driver_name = "udd";
-       class->driver_version = RTDM_DRIVER_VER(1, 0, 0);
-       class->peripheral_name = "UDD mapper";
-       class->provider_name = "Philippe Gerum <r...@xenomai.org>";
-       
        dev->class = class;
        dev->label = ur->mapper_name;
 
@@ -373,10 +368,6 @@ int udd_register_device(struct udd_device *udd)
                .close = udd_close,
                .select = udd_select,
        };
-       class->driver_name = "udd";
-       class->driver_version = udd->driver_version;
-       class->peripheral_name = udd->device_description;
-       class->provider_name = udd->driver_author;
 
        dev->class = class;
        dev->label = udd->device_name;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to