Re: [PATCH] Add SPI over GPIO driver
From: Andrew Morton
Date: Mon Jul 14 2008 - 16:44:26 EST
On Mon, 14 Jul 2008 21:09:12 +0200
Michael Buesch <mb@xxxxxxxxx> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/