[PATCH v4 1/2] spi: implemented driver for Cirrus EP93xx SPI controller
Mika Westerberg
mika.westerberg at iki.fi
Wed Apr 21 12:54:20 EDT 2010
On Wed, Apr 21, 2010 at 11:47:13AM -0500, H Hartley Sweeten wrote:
> On Wednesday, April 21, 2010 12:16 AM, Mika Westerberg wrote:
> > I think it is more readable to do:
> >
> > ep93xx_spi_select_device(espi, msg->spi);
> >
> > and
> >
> > ep93xx_spi_deselect_device(espi, msg->spi);
> >
> > It can be seen from the function names what we are doing.
>
> So rename the combined function to ep93xx_spi_cs_control and pass the "control"
> parameter as a bool; true = selected, false = deselected.
>
> Having the two almost identical functions is a bit redundant. It also gives you
> two places to have to maintain basically the same operation. I think this is
> what Grant was referring to with his previous comment.
Agreed. Will do.
Thanks,
MW
More information about the linux-arm-kernel
mailing list