if (!spi_get_ctldata(spi)) {
err = gpio_request(cs->line, dev_name(&spi->dev));
if (err) {
- dev_err(&spi->dev, "request for slave select gpio "
- "line [%d] failed\n", cs->line);
- err = -EBUSY;
+ dev_err(&spi->dev,
+ "Failed to get /CS gpio [%d]: %d\n",
+ cs->line, err);
goto err_gpio_req;
}
spi_set_ctldata(spi, cs);
ret = gpio_request(gpio, "spi-bus");
if (ret) {
- dev_err(dev, "gpio [%d] request failed\n", gpio);
+ dev_err(dev, "gpio [%d] request failed: %d\n",
+ gpio, ret);
goto free_gpio;
}
}