[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130401133833.GT18636@opensource.wolfsonmicro.com>
Date: Mon, 1 Apr 2013 14:38:33 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Wenyou Yang <wenyou.yang@...el.com>
Cc: linux-arm-kernel@...ts.infradead.org, grant.likely@...retlab.ca,
richard.genoud@...il.com, plagnioj@...osoft.com,
nicolas.ferre@...el.com, JM.Lin@...el.com,
spi-devel-general@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 01/14] spi/spi-atmel: detect the capabilities of SPI
core by reading the VERSION register.
On Tue, Mar 19, 2013 at 03:42:15PM +0800, Wenyou Yang wrote:
> +{
> + unsigned int version;
> +
> + version = atmel_get_version(as);
> + dev_info(&as->pdev->dev, "version: 0x%x\n", version);
> +
> + as->caps.is_spi2 = (version > 0x121) ? true : false;
> + as->caps.has_wdrbt = (version >= 0x210) ? true : false;
> + as->caps.has_dma_support = (version >= 0x212) ? true : false;
> +}
> +
There's absolutely no need for the ternery operators here - your
comparisons are already boolean, the ternery operators just add noise.
I've applied this with the above edited to remove the ? true : false,
thanks.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists