public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Osama Muhammad <osmtendev@gmail.com>
Cc: gregkh@linuxfoundation.org, speakup@linux-speakup.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Accessiblity: speakup: specifying the default driver parameters among the module params
Date: Sat, 15 Oct 2022 23:30:12 +0200	[thread overview]
Message-ID: <20221015213012.zctcugroxehxtjim@begin> (raw)
In-Reply-To: <20221013223024.22708-1-osmtendev@gmail.com>

Osama Muhammad, le ven. 14 oct. 2022 03:30:24 +0500, a ecrit:
> This is an enhancement which allows to specify the default driver
> parameters among the module parameters.
> 
> Adding  default variables to the speakup_soft module
> allows to easily set that at boot, rather than
> setting the sys variables after boot.
> More details can be found here:
> https://github.com/linux-speakup/speakup/issues/7
> 
> Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
> 
> ---
> 
> Changes since v1:
> 	- Added NB_ID as the last member of enum default_vars_id.
> 	- Added NB_ID as the size of array vars.
> 	- Made sure that that the enteries in vars are in correct order.

Thanks!

It looks almost good to me now.

> ---
>  drivers/accessibility/speakup/speakup_soft.c | 57 ++++++++++++++------
>  1 file changed, 42 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/accessibility/speakup/speakup_soft.c b/drivers/accessibility/speakup/speakup_soft.c
> index 28c8f60370cf..5d8e2c1e7f4c 100644
> --- a/drivers/accessibility/speakup/speakup_soft.c
> +++ b/drivers/accessibility/speakup/speakup_soft.c
> @@ -33,21 +33,30 @@ static struct miscdevice synth_device, synthu_device;
>  static int init_pos;
>  static int misc_registered;
>  
> -static struct var_t vars[] = {
> +
> +enum default_vars_id {
> +	DIRECT_ID = 0, CAPS_START_ID, CAPS_STOP_ID,
> +	PAUSE_ID, RATE_ID, PITCH_ID, INFLECTION_ID,
> +	VOL_ID, TONE_ID, PUNCT_ID, VOICE_ID,
> +	FREQUENCY_ID, V_LAST_VAR_ID,
> +	 NB_ID
> +};
> +
> +
> +static struct var_t vars[NB_ID] = {
>  	/* DIRECT is put first so that module_param_named can access it easily */
> -	{ DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
> -

You can now remove the comment, since now the ordering is not important.

Samuel

      reply	other threads:[~2022-10-15 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 22:30 [PATCH v2] Accessiblity: speakup: specifying the default driver parameters among the module params Osama Muhammad
2022-10-15 21:30 ` Samuel Thibault [this message]

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=20221015213012.zctcugroxehxtjim@begin \
    --to=samuel.thibault@ens-lyon.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osmtendev@gmail.com \
    --cc=speakup@linux-speakup.org \
    /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