mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Donald" <donald@asix.com.tw>
Cc: "'Greg KH'" <gregkh@linuxfoundation.org>,
	"'open list:USB SUBSYSTEM'" <linux-usb@vger.kernel.org>,
	"'open list'" <linux-kernel@vger.kernel.org>
Subject: Re: Patch "USB: serial: mos7840: Supported MCS7810 device"
Date: Fri, 13 Apr 2012 13:57:10 +0100	[thread overview]
Message-ID: <20120413135710.32cb3170@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <002701cd191c$1077d580$31678080$@com.tw>

On Fri, 13 Apr 2012 10:20:52 +0800
"Donald" <donald@asix.com.tw> wrote:

> Hi Alan,
> 
> Thank you for your reply. As for your comment regarding the LED feature flag, the driver can provide a flag parameter for LED
> feature so that users will be able to set this LED feature at loading the driver, and by default, this flag is set false (LED
> feature is disabled). Could you let me know if this is what exactly matches your comment?

What I mean is that all over the code you have added

if (serial->num_ports == 1 && mos7840_port->...)


If a future device has LEDs and multiple ports, or a future device has
one port and no LED then all of them will need changing.

Instead if you had code in one place at initialisation which did


	if (type == 7840 && serial->num_ports == 1)
			mos7840_port->has_led = true;


then elsewhere did


	if (mos7840_port->has_led && ....)


then it will avoid problems in the future.


  reply	other threads:[~2012-04-13 12:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12  6:00 Donald
2012-04-12  9:49 ` Alan Cox
2012-04-13  2:20   ` Donald
2012-04-13 12:57     ` Alan Cox [this message]
2012-04-14  6:48       ` Donald
2012-04-13 14:24     ` 'Greg KH'
  -- strict thread matches above, loose matches on Subject: below --
2012-04-19  7:00 Donald
2012-03-13  7:54 [PATCH 1/1] x86: Fixed MCS7820 device attach problem Donald
2012-03-13 16:09 ` 'Greg KH'
2012-03-29 13:33   ` Patch "USB: serial: mos7840: Supported MCS7810 device" Donald
2012-03-29 15:04     ` Alan Cox
2012-03-30  2:16       ` Donald
2012-03-29 15:13     ` 'Greg KH'
2012-03-30  2:21       ` Donald
2012-04-11  9:32       ` Donald
2012-04-11 11:08         ` Johan Hovold
2012-04-11 11:43           ` Donald
2012-04-11 14:03         ` 'Greg KH'

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=20120413135710.32cb3170@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=donald@asix.com.tw \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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

all inboxes | Powered by JetHome®