diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-05 13:53:22 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-24 10:32:24 -0400 |
commit | 900bfe33b6d46058c4dd64d4bff7f287baf2a34e (patch) | |
tree | e06f41e9b650ef2aaa9a991c5c3cb60c76c3cb56 | |
parent | 9f4b323803ff18d87dcc042723b527ee646dddfc (diff) |
spi/s3c64xx: Remove unused message queue
Since the driver has been converted to use the core message pump code
the only use of the messsage queue in the driver is a check to see if
it is empty which will always succeed since nothing ever adds to the
queue. Just remove the queue.
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 63e2070c6c14..3fb8c96ece41 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -172,7 +172,6 @@ struct s3c64xx_spi_port_config { | |||
172 | * @master: Pointer to the SPI Protocol master. | 172 | * @master: Pointer to the SPI Protocol master. |
173 | * @cntrlr_info: Platform specific data for the controller this driver manages. | 173 | * @cntrlr_info: Platform specific data for the controller this driver manages. |
174 | * @tgl_spi: Pointer to the last CS left untoggled by the cs_change hint. | 174 | * @tgl_spi: Pointer to the last CS left untoggled by the cs_change hint. |
175 | * @queue: To log SPI xfer requests. | ||
176 | * @lock: Controller specific lock. | 175 | * @lock: Controller specific lock. |
177 | * @state: Set of FLAGS to indicate status. | 176 | * @state: Set of FLAGS to indicate status. |
178 | * @rx_dmach: Controller's DMA channel for Rx. | 177 | * @rx_dmach: Controller's DMA channel for Rx. |
@@ -193,7 +192,6 @@ struct s3c64xx_spi_driver_data { | |||
193 | struct spi_master *master; | 192 | struct spi_master *master; |
194 | struct s3c64xx_spi_info *cntrlr_info; | 193 | struct s3c64xx_spi_info *cntrlr_info; |
195 | struct spi_device *tgl_spi; | 194 | struct spi_device *tgl_spi; |
196 | struct list_head queue; | ||
197 | spinlock_t lock; | 195 | spinlock_t lock; |
198 | unsigned long sfr_start; | 196 | unsigned long sfr_start; |
199 | struct completion xfer_completion; | 197 | struct completion xfer_completion; |
@@ -1056,8 +1054,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi) | |||
1056 | struct s3c64xx_spi_csinfo *cs = spi->controller_data; | 1054 | struct s3c64xx_spi_csinfo *cs = spi->controller_data; |
1057 | struct s3c64xx_spi_driver_data *sdd; | 1055 | struct s3c64xx_spi_driver_data *sdd; |
1058 | struct s3c64xx_spi_info *sci; | 1056 | struct s3c64xx_spi_info *sci; |
1059 | struct spi_message *msg; | ||
1060 | unsigned long flags; | ||
1061 | int err; | 1057 | int err; |
1062 | 1058 | ||
1063 | sdd = spi_master_get_devdata(spi->master); | 1059 | sdd = spi_master_get_devdata(spi->master); |
@@ -1088,21 +1084,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi) | |||
1088 | 1084 | ||
1089 | sci = sdd->cntrlr_info; | 1085 | sci = sdd->cntrlr_info; |
1090 | 1086 | ||
1091 | spin_lock_irqsave(&sdd->lock, flags); | ||
1092 | |||
1093 | list_for_each_entry(msg, &sdd->queue, queue) { | ||
1094 | /* Is some mssg is already queued for this device */ | ||
1095 | if (msg->spi == spi) { | ||
1096 | dev_err(&spi->dev, | ||
1097 | "setup: attempt while mssg in queue!\n"); | ||
1098 | spin_unlock_irqrestore(&sdd->lock, flags); | ||
1099 | err = -EBUSY; | ||
1100 | goto err_msgq; | ||
1101 | } | ||
1102 | } | ||
1103 | |||
1104 | spin_unlock_irqrestore(&sdd->lock, flags); | ||
1105 | |||
1106 | pm_runtime_get_sync(&sdd->pdev->dev); | 1087 | pm_runtime_get_sync(&sdd->pdev->dev); |
1107 | 1088 | ||
1108 | /* Check if we can provide the requested rate */ | 1089 | /* Check if we can provide the requested rate */ |
@@ -1149,7 +1130,6 @@ setup_exit: | |||
1149 | /* setup() returns with device de-selected */ | 1130 | /* setup() returns with device de-selected */ |
1150 | disable_cs(sdd, spi); | 1131 | disable_cs(sdd, spi); |
1151 | 1132 | ||
1152 | err_msgq: | ||
1153 | gpio_free(cs->line); | 1133 | gpio_free(cs->line); |
1154 | spi_set_ctldata(spi, NULL); | 1134 | spi_set_ctldata(spi, NULL); |
1155 | 1135 | ||
@@ -1442,7 +1422,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) | |||
1442 | 1422 | ||
1443 | spin_lock_init(&sdd->lock); | 1423 | spin_lock_init(&sdd->lock); |
1444 | init_completion(&sdd->xfer_completion); | 1424 | init_completion(&sdd->xfer_completion); |
1445 | INIT_LIST_HEAD(&sdd->queue); | ||
1446 | 1425 | ||
1447 | ret = devm_request_irq(&pdev->dev, irq, s3c64xx_spi_irq, 0, | 1426 | ret = devm_request_irq(&pdev->dev, irq, s3c64xx_spi_irq, 0, |
1448 | "spi-s3c64xx", sdd); | 1427 | "spi-s3c64xx", sdd); |