aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-s3c64xx.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index d67384b3c318..2330dceb27cc 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1071,20 +1071,21 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
1071 return -ENODEV; 1071 return -ENODEV;
1072 } 1072 }
1073 1073
1074 /* Request gpio only if cs line is asserted by gpio pins */ 1074 if (!spi_get_ctldata(spi)) {
1075 if (sdd->cs_gpio) { 1075 /* Request gpio only if cs line is asserted by gpio pins */
1076 err = gpio_request_one(cs->line, GPIOF_OUT_INIT_HIGH, 1076 if (sdd->cs_gpio) {
1077 dev_name(&spi->dev)); 1077 err = gpio_request_one(cs->line, GPIOF_OUT_INIT_HIGH,
1078 if (err) { 1078 dev_name(&spi->dev));
1079 dev_err(&spi->dev, 1079 if (err) {
1080 "Failed to get /CS gpio [%d]: %d\n", 1080 dev_err(&spi->dev,
1081 cs->line, err); 1081 "Failed to get /CS gpio [%d]: %d\n",
1082 goto err_gpio_req; 1082 cs->line, err);
1083 goto err_gpio_req;
1084 }
1083 } 1085 }
1084 }
1085 1086
1086 if (!spi_get_ctldata(spi))
1087 spi_set_ctldata(spi, cs); 1087 spi_set_ctldata(spi, cs);
1088 }
1088 1089
1089 sci = sdd->cntrlr_info; 1090 sci = sdd->cntrlr_info;
1090 1091