public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 6/9] introduce module_param_array_named
Date: Sun, 29 Feb 2004 02:00:04 -0500	[thread overview]
Message-ID: <200402290200.07447.dtor_core@ameritech.net> (raw)
In-Reply-To: <200402290158.52036.dtor_core@ameritech.net>


===================================================================


ChangeSet@1.1690, 2004-02-28 00:20:14-05:00, dtor_core@ameritech.net
  Introduce module_param_array_named to allow for module options with
  name different form corresponding array variable. Allows using short
  (but descriptive) option names without hurting code readability.
  
  Modeled after module_param_named.


 moduleparam.h |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


===================================================================



diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- a/include/linux/moduleparam.h	Sun Feb 29 01:18:36 2004
+++ b/include/linux/moduleparam.h	Sun Feb 29 01:18:36 2004
@@ -126,12 +126,15 @@
 #define param_check_invbool(name, p) __param_check(name, p, int)
 
 /* Comma-separated array: num is set to number they actually specified. */
-#define module_param_array(name, type, num, perm)			\
+#define module_param_array_named(name, array, type, num, perm)		\
 	static struct kparam_array __param_arr_##name			\
-	= { ARRAY_SIZE(name), &num, param_set_##type, param_get_##type,	\
-	    sizeof(name[0]), name };					\
+	= { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\
+	    sizeof(array[0]), array };					\
 	module_param_call(name, param_array_set, param_array_get, 	\
 			  &__param_arr_##name, perm)
+
+#define module_param_array(name, type, num, perm)		\
+	module_param_array_named(name, name, type, num, perm)
 
 extern int param_array_set(const char *val, struct kernel_param *kp);
 extern int param_array_get(char *buffer, struct kernel_param *kp);

  reply	other threads:[~2004-02-29  7:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-29  6:53 [PATCH 0/9] New set of input patches Dmitry Torokhov
2004-02-29  6:55 ` [PATCH 1/9] atkbd whitespace fixes Dmitry Torokhov
2004-02-29  6:55   ` [PATCH 2/9] atkbd bad merge Dmitry Torokhov
2004-02-29  6:56     ` [PATCH 3/9] synaptics strict/relaxed protocol checks Dmitry Torokhov
2004-02-29  6:58       ` [PATCH 4/9] psmouse whitespace fixes Dmitry Torokhov
2004-02-29  6:58         ` [PATCH 5/9] psmouse broken hardware workaround Dmitry Torokhov
2004-02-29  7:00           ` Dmitry Torokhov [this message]
2004-02-29  7:01             ` [PATCH 7/9] Move joysticks to the module_param way of handling options Dmitry Torokhov
2004-02-29  7:02               ` [PATCH 8/9] introduce __obsolete_setup Dmitry Torokhov
2004-02-29  7:03                 ` [PATCH 9/9] Document removed input options using __obsolete_setup Dmitry Torokhov
2004-03-02 13:02 ` [PATCH 0/9] New set of input patches Vojtech Pavlik
2004-03-02 17:45   ` Dmitry Torokhov
2004-03-02 23:56     ` bkbits hosting (was Re: [PATCH 0/9] New set of input patches) Andy Isaacson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402290200.07447.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox