From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCHv2 3/3] Add platform driver on top of the new
Date: Fri, 14 Mar 2008 11:51:51 +0100 [thread overview]
Message-ID: <20080314105151.GA32766@pengutronix.de> (raw)
In-Reply-To: <200803101002.52153.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]
On Mon, Mar 10, 2008 at 09:02:51AM -0800, David Brownell wrote:
> You should #include <linux/gpio.h> now and avoid a lot
> of this #ifdeffery ... which is something I think you'd
> be told by running checkpatch.pl on 2.6.25-rc5, as well
> as most RC4 kernels.
Last time I changed my #includes from asm/foo.h to linux/foo.h, it was
also wrong :) But now I researched that for irq.h checkpatch.pl had a
bug (patch sent), for io.h it is unknown and uncommon to replace it
(still recommended according to lkml) and for gpio.h it is probably the
right thing to do.
Still, using <linux/gpio.h> does not really avoid the #ifdefs if the
priority is to produce less code in the driver. It does avoid them if
the priority is simply to remove them (for the price of having an
integer and two small blocks of code as unused overhead). May I assume
that it getting rid of #ifdefs has priority?
> > + /* Use NO_GPIO when this macro is in mainline */
> I hope you mean gpio_is_valid() instead... that's in MM,
> but not yet mainline (except when <linux/gpio.h> is all
> stubs).
Will change the comment.
I also realized that I should register/deregister the gpio-pin in the
driver; used to have this in the boardsetup, sigh. Will send an updated
version later today.
All the best,
Wolfram
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
prev parent reply other threads:[~2008-03-14 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 17:02 [PATCHv2 3/3] Add platform driver on top of the new David Brownell
[not found] ` <200803101002.52153.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-14 10:51 ` Wolfram Sang [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=20080314105151.GA32766@pengutronix.de \
--to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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