linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: "Song, Barry" <Barry.Song@analog.com>
Cc: David Brownell <david-b@pacbell.net>,
	dmitry.torokhov@gmail.com,
	uclinux-dist-devel@blackfin.uclinux.org,
	linux-input@vger.kernel.org
Subject: Re: [Uclinux-dist-devel] [PATCH v2]add analog devices AD714Xcaptouch input driver
Date: Wed, 9 Sep 2009 03:47:58 -0400	[thread overview]
Message-ID: <8bd0f97a0909090047s3510b0c5mb52380108bde64a5@mail.gmail.com> (raw)
In-Reply-To: <0F1B54C89D5F954D8535DB252AF412FA04B4C3BE@chinexm1.ad.analog.com>

On Wed, Sep 9, 2009 at 03:15, Song, Barry wrote:
>From: Mike Frysinger [mailto:vapier.adi@gmail.com]
>>On Tue, Sep 8, 2009 at 23:33, Song, Barry wrote:
>>> +static inline int ad714x_spi_register_driver(struct
>>> spi_driver *spi_drv)
>>> +{
>>> +       return spi_register_driver(spi_drv);
>>> +}
>>> +
>>> +static inline void ad714x_spi_unregister_driver(struct
>>spi_driver *spi_drv)
>>> +{
>>> +       spi_unregister_driver(spi_drv);
>>> +}
>>> +
>>> +#else
>>> +#define ad714x_spi_register_driver(p) 0
>>> +#define ad714x_spi_unregister_driver(p)
>>>  #endif
>>
>>i dont think you need the ifdef protection that far up.  what about
>>using the ifdef in this one place:
>>static inline int ad714x_spi_register_driver(struct spi_driver
>>*spi_drv)
>>{
>>#if defined(CONFIG_SPI) || defined(CONFIG_SPI_MODULE)
>>    return spi_register_driver(spi_drv);
>>#else
>>    return 0;
>>#endif
>>}
>>
>>then i imagine you can have all the other pieces always enabled.  gcc
>>will see that everything is marked static and not used, so it'll cull
>>things.
>
> In fact, I have tried to do like this before changing like I sent in the last mail. In fact, it will get compiling error if I always enable all spi and i2c functions without a #ifdef protection.
> So since there are far #ifdef, I think it shoud be better to place related codes to existed #ifdef.

i really have no idea what you're trying to say or why it didnt work for you
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-09-09  7:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08  9:19 [PATCH v2]add analog devices AD714X captouch input driver Barry Song
     [not found] ` <1252401564-5291-1-git-send-email-21cnbao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-09-08 18:49   ` David Brownell
2009-09-09  2:11     ` [Uclinux-dist-devel] [PATCH v2]add analog devices AD714Xcaptouch " Song, Barry
2009-09-09  2:29       ` David Brownell
2009-09-09  2:59         ` Song, Barry
2009-09-09  3:33         ` Song, Barry
     [not found]           ` <0F1B54C89D5F954D8535DB252AF412FA04B118A5-SGdA1W8gREmuVPpjEGsWsTcYPEmu4y7e@public.gmane.org>
2009-09-09  6:05             ` Mike Frysinger
2009-09-09  7:15               ` [Uclinux-dist-devel] " Song, Barry
2009-09-09  7:47                 ` Mike Frysinger [this message]
2009-09-09  8:15                   ` Song, Barry
2009-09-09  6:08   ` [PATCH v2]add analog devices AD714X captouch " Mike Frysinger
2009-09-09  7:20     ` [Uclinux-dist-devel] [PATCH v2]add analog devices AD714Xcaptouch " Song, Barry

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=8bd0f97a0909090047s3510b0c5mb52380108bde64a5@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=Barry.Song@analog.com \
    --cc=david-b@pacbell.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.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;
as well as URLs for NNTP newsgroup(s).