lkml.org 
[lkml]   [2008]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add SPI over GPIO driver
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?


\
 
 \ /
  Last update: 2008-07-14 22:47    [W:0.112 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site