public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michael Buesch <mb@bu3sch.de>
Cc: sfr@canb.auug.org.au, linux-kernel@vger.kernel.org,
	david-b@pacbell.net, piotr.skamruk@gmail.com,
	openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH] Add SPI over GPIO driver
Date: Mon, 14 Jul 2008 13:43:45 -0700	[thread overview]
Message-ID: <20080714134345.a2287c6c.akpm@linux-foundation.org> (raw)
In-Reply-To: <200807142109.13243.mb@bu3sch.de>

On Mon, 14 Jul 2008 21:09:12 +0200
Michael Buesch <mb@bu3sch.de> wrote:

> +static inline void do_spidelay(struct spi_device *dev, unsigned nsecs)
> +{
> +	struct spi_gpio *sp = spidev_to_sg(dev);
> +
> +	if (!sp->info->no_spi_delay)
> +		ndelay(nsecs);
> +}
> +
> +#define spidelay(nsecs) do {					\
> +	/* Steal the spi_device pointer from our caller.	\
> +	 * The bitbang-API should probably get fixed here... */	\
> +	do_spidelay(spi, nsecs);				\
> +  } while (0)

A macro which requires that its caller have a particular local variable
is a bit nasty.  Could we plan to add the spi_device* to spidelay()
please? 

  reply	other threads:[~2008-07-14 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-14 19:09 [PATCH] Add SPI over GPIO driver Michael Buesch
2008-07-14 20:43 ` Andrew Morton [this message]
2008-07-15 12:52   ` Michael Buesch
2008-07-15  5:30 ` Ben Nizette
2008-07-15 13:05   ` Michael Buesch

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=20080714134345.a2287c6c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=piotr.skamruk@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /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