From: Johan Hovold <johan@kernel.org>
To: Martyn Welch <martyn.welch@collabora.co.uk>
Cc: Konstantin Shkolnyy <Konstantin.Shkolnyy@silabs.com>,
Johan Hovold <johan@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v2] USB: serial: cp210x: Adding GPIO support for CP2105
Date: Sun, 31 Jan 2016 20:57:42 +0100 [thread overview]
Message-ID: <20160131195742.GB2957@localhost> (raw)
In-Reply-To: <5697770F.9040707@collabora.co.uk>
On Thu, Jan 14, 2016 at 10:23:11AM +0000, Martyn Welch wrote:
> On 14/01/16 00:27, Konstantin Shkolnyy wrote:
> >> static struct usb_serial_driver cp210x_device = {
> >> @@ -219,6 +229,7 @@ static struct usb_serial_driver cp210x_device = {
> >> .tx_empty = cp210x_tx_empty,
> >> .tiocmget = cp210x_tiocmget,
> >> .tiocmset = cp210x_tiocmset,
> >> + .probe = cp210x_probe,
> >
> > Enclose this in CONFIG_GPIOLIB?
> > ...
> >
>
> Can do, though splattering ifdefs all over the driver isn't particularly
> nice.
>
> I guess the question I have is: Would the preference be to ifdef out all
> extraneous functionality when GPIOLIB isn't enabled or to minimise the
> number of ifdef's at the expense of building in some functionality that
> wasn't then used?
Try to minimise the ifdefs and use dummy inline functions in case
!CONFIG_GPIOLIB. That way you should not need to add more than two
ifdefs (data + code).
Thanks,
Johan
prev parent reply other threads:[~2016-01-31 19:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 17:57 [PATCH v2] USB: serial: cp210x: Adding GPIO support for CP2105 kbuild test robot
2016-01-13 12:30 ` Martyn Welch
2016-01-13 16:22 ` Martyn Welch
2016-01-13 17:57 ` [PATCH] USB: serial: cp210x: fix noderef.cocci warnings kbuild test robot
2016-01-14 0:27 ` [PATCH v2] USB: serial: cp210x: Adding GPIO support for CP2105 Konstantin Shkolnyy
2016-01-14 9:28 ` Linus Walleij
[not found] ` <BLUPR0701MB1572CDBC6E43EA82429B723491CC0-v5ruerSQ/ojJf3AXQIW3Ok5OhdzP3rhOnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2016-01-14 10:23 ` Martyn Welch
2016-01-14 14:29 ` Konstantin Shkolnyy
2016-01-14 15:17 ` Martyn Welch
2016-01-31 19:57 ` Johan Hovold [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=20160131195742.GB2957@localhost \
--to=johan@kernel.org \
--cc=Konstantin.Shkolnyy@silabs.com \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martyn.welch@collabora.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).