Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2 fix description setting.



details:   https://anonhg.NetBSD.org/src/rev/40aaf487d99a
branches:  trunk
changeset: 803790:40aaf487d99a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 12 04:53:13 2014 +0000

description:
fix description setting.

diffstat:

 sys/external/bsd/drm2/drm/drm_sysctl.c            |   4 ++--
 sys/external/bsd/drm2/include/linux/moduleparam.h |  12 +++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (54 lines):

diff -r 79b2fd6c1e7a -r 40aaf487d99a sys/external/bsd/drm2/drm/drm_sysctl.c
--- a/sys/external/bsd/drm2/drm/drm_sysctl.c    Wed Nov 12 03:49:26 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_sysctl.c    Wed Nov 12 04:53:13 2014 +0000
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_sysctl.c,v 1.2 2014/11/12 03:14:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_sysctl.c,v 1.3 2014/11/12 04:53:13 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -48,7 +48,7 @@
 
        for (; b < e; b++) {
                const struct linux_module_param_desc *d = *b;
-               if (strcmp(p->name, d->name) == 0)
+               if (strcmp(p->dname, d->name) == 0)
                        return d->description;
        }
        return NULL;
diff -r 79b2fd6c1e7a -r 40aaf487d99a sys/external/bsd/drm2/include/linux/moduleparam.h
--- a/sys/external/bsd/drm2/include/linux/moduleparam.h Wed Nov 12 03:49:26 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/moduleparam.h Wed Nov 12 04:53:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: moduleparam.h,v 1.3 2014/11/12 02:24:40 christos Exp $ */
+/*     $NetBSD: moduleparam.h,v 1.4 2014/11/12 04:53:14 christos Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,10 +35,11 @@
 #include <sys/types.h>
 
 struct linux_module_param_info {
-       const char *name;
-       void *ptr;
-       int type;
-       mode_t mode;
+       const char *dname;      // Name used for description
+       const char *name;       // Name for sysctl
+       void *ptr;              // Pointer to variable value
+       int type;               // MTYPE_ 
+       mode_t mode;            // 600 (rw) or 400 (r)
 };
 
 #define MTYPE_int      0
@@ -46,6 +47,7 @@
 
 #define        module_param_named(NAME, VAR, TYPE, MODE) \
 static __attribute__((__used__)) struct linux_module_param_info info_ ## NAME = { \
+       .dname = # NAME, \
        .name = # VAR, \
        .ptr = & VAR, \
        .type = MTYPE_ ## TYPE, \



Home | Main Index | Thread Index | Old Index