public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH 3/3] i2c: parport: move include file into main source
Date: Wed, 15 Jan 2020 15:17:43 +0100	[thread overview]
Message-ID: <20200115151743.63e6b02d@endymion> (raw)
In-Reply-To: <20200113210643.5033-4-wsa+renesas@sang-engineering.com>

On Mon, 13 Jan 2020 22:06:43 +0100, Wolfram Sang wrote:
> After removal of the parport-light driver, this include is used by the
> parport driver exclusively and can be included in the main source.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/i2c/busses/i2c-parport.c | 100 ++++++++++++++++++++++++++++-
>  drivers/i2c/busses/i2c-parport.h | 106 -------------------------------
>  2 files changed, 99 insertions(+), 107 deletions(-)
>  delete mode 100644 drivers/i2c/busses/i2c-parport.h
> 
> diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
> index e8ed882de402..d03d22812eef 100644
> --- a/drivers/i2c/busses/i2c-parport.c
> +++ b/drivers/i2c/busses/i2c-parport.c
> (...)
> @@ -42,6 +125,7 @@ static LIST_HEAD(adapter_list);
>  static DEFINE_MUTEX(adapter_list_lock);
>  #define MAX_DEVICE 4
>  static int parport[MAX_DEVICE] = {0, -1, -1, -1};
> +static int type = -1;
>  
>  
>  /* ----- Low-level parallel port access ----------------------------------- */
> @@ -318,5 +402,19 @@ MODULE_PARM_DESC(parport,
>  		 " Default is one device connected to parport0.\n"
>  );
>  
> +module_param(type, int, 0);
> +MODULE_PARM_DESC(type,
> +	"Type of adapter:\n"
> +	" 0 = Philips adapter\n"
> +	" 1 = home brew teletext adapter\n"
> +	" 2 = Velleman K8000 adapter\n"
> +	" 3 = ELV adapter\n"
> +	" 4 = ADM1032 evaluation board\n"
> +	" 5 = ADM1025, ADM1030 and ADM1031 evaluation boards\n"
> +	" 6 = Barco LPT->DVI (K5800236) adapter\n"
> +	" 7 = One For All JP1 parallel port adapter\n"
> +	" 8 = VCT-jig\n"
> +);

Isn't it considered a better practice to keep the module_param (and
MODULE_PARM_DESC) close to the declaration of the variable itself so
that correctness can be easily verified and changing the type later
would be easier?

Other than that, I'm fine with the change, thanks for doing this.

Reviewed-by: Jean Delvare <jdelvare@suse.de>

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2020-01-15 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 21:06 [PATCH 0/3] i2c: for next API conversion, remove parport-light driver Wolfram Sang
2020-01-13 21:06 ` [PATCH 1/3] i2c: parport-light: remove driver Wolfram Sang
2020-01-15 11:04   ` Jean Delvare
2020-01-15 17:26   ` Wolfram Sang
2020-01-13 21:06 ` [PATCH 2/3] i2c: parport: simplify Kconfig description Wolfram Sang
2020-01-15 11:07   ` Jean Delvare
2020-01-15 17:26   ` Wolfram Sang
2020-01-13 21:06 ` [PATCH 3/3] i2c: parport: move include file into main source Wolfram Sang
2020-01-15 14:17   ` Jean Delvare [this message]
2020-01-15 17:26     ` Wolfram Sang

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=20200115151743.63e6b02d@endymion \
    --to=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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