On Wed, Jan 3, 2018 at 4:23 PM, Rob Herring <robh@xxxxxxxxxx> wrote: > On Mon, Jan 1, 2018 at 7:37 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: >> +/* >> + * The SPI GPIO bindings happened before we managed to establish that GPIO >> + * properties should be named "foo-gpios" so we have this special kludge for >> + * them. >> + */ >> +#ifdef CONFIG_SPI_MASTER >> +static struct gpio_desc *of_find_spi_gpio(struct device *dev, const char *con_id, >> + enum of_gpio_flags *of_flags) >> +{ >> + char prop_name[32]; /* 32 is max size of property name */ >> + struct device_node *np = dev->of_node; >> + struct gpio_desc *desc; > > Instead of the ifdef: > > if (!IS_ENABLED(CONFIG_SPI_MASTER)) > return ERR_PTR(-ENOENT); > > Or merge the condition with the if below. I was consciously exploting the fact the CONFIG_SPI_MASTER is bool, but I guess that can be fragile if someone decides to modularize it so, OK. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html