[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120413135710.32cb3170@pyramind.ukuu.org.uk>
Date: Fri, 13 Apr 2012 13:57:10 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: "Donald" <donald@...x.com.tw>
Cc: "'Greg KH'" <gregkh@...uxfoundation.org>,
"'open list:USB SUBSYSTEM'" <linux-usb@...r.kernel.org>,
"'open list'" <linux-kernel@...r.kernel.org>
Subject: Re: Patch "USB: serial: mos7840: Supported MCS7810 device"
On Fri, 13 Apr 2012 10:20:52 +0800
"Donald" <donald@...x.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists