On Mon, Apr 06, 2015 at 05:16:32PM +0000, [email protected] wrote: > + mutex_lock(&board_lock); > + list_for_each_entry(bi, &board_list, list) { > + sbi = &bi->board_info; > + if ((master->bus_num == sbi->bus_num) && > + (sbi->chip_select < master->num_chipselect) && > + gpio_is_valid(master->cs_gpios[sbi->chip_select]) && > + (sbi->mode & SPI_CS_HIGH)) > + gpio_set_value(master->cs_gpios[sbi->chip_select], 0);
Please write a series of if statements with continues instead, the above
block is pretty much illegible with the lack of vertical space, mixture
of bracketing levels and small indent for the active statement at the
end.
As far as I can tell this code only works for GPIO chip selects?
> +static void acpi_spi_setup_gpiopins(struct spi_master *master)
> +{
> + /* probably not needed, as there seems to be no cs_gpio
> + * information in the ACPI structures but left for completeness
> + * to get extended if needed
> + */
> +}
Please don't write placeholders like this.
signature.asc
Description: Digital signature
