* [PATCH] spi/s3c64xx: Remove unused message queue
@ 2013-07-05 17:56 Mark Brown
2013-07-05 23:54 ` Tomasz Figa
2013-07-24 13:18 ` Kukjin Kim
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2013-07-05 17:56 UTC (permalink / raw)
To: Kukjin Kim, Grant Likely; +Cc: linux-samsung-soc, Mark Brown
From: Mark Brown <broonie@linaro.org>
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>
---
drivers/spi/spi-s3c64xx.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index eb53df2..def13e8 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -172,7 +172,6 @@ struct s3c64xx_spi_port_config {
* @master: Pointer to the SPI Protocol master.
* @cntrlr_info: Platform specific data for the controller this driver manages.
* @tgl_spi: Pointer to the last CS left untoggled by the cs_change hint.
- * @queue: To log SPI xfer requests.
* @lock: Controller specific lock.
* @state: Set of FLAGS to indicate status.
* @rx_dmach: Controller's DMA channel for Rx.
@@ -193,7 +192,6 @@ struct s3c64xx_spi_driver_data {
struct spi_master *master;
struct s3c64xx_spi_info *cntrlr_info;
struct spi_device *tgl_spi;
- struct list_head queue;
spinlock_t lock;
unsigned long sfr_start;
struct completion xfer_completion;
@@ -1053,8 +1051,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
struct s3c64xx_spi_csinfo *cs = spi->controller_data;
struct s3c64xx_spi_driver_data *sdd;
struct s3c64xx_spi_info *sci;
- struct spi_message *msg;
- unsigned long flags;
int err;
sdd = spi_master_get_devdata(spi->master);
@@ -1085,21 +1081,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
sci = sdd->cntrlr_info;
- spin_lock_irqsave(&sdd->lock, flags);
-
- list_for_each_entry(msg, &sdd->queue, queue) {
- /* Is some mssg is already queued for this device */
- if (msg->spi == spi) {
- dev_err(&spi->dev,
- "setup: attempt while mssg in queue!\n");
- spin_unlock_irqrestore(&sdd->lock, flags);
- err = -EBUSY;
- goto err_msgq;
- }
- }
-
- spin_unlock_irqrestore(&sdd->lock, flags);
-
pm_runtime_get_sync(&sdd->pdev->dev);
/* Check if we can provide the requested rate */
@@ -1146,7 +1127,6 @@ setup_exit:
/* setup() returns with device de-selected */
disable_cs(sdd, spi);
-err_msgq:
gpio_free(cs->line);
spi_set_ctldata(spi, NULL);
@@ -1439,7 +1419,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
spin_lock_init(&sdd->lock);
init_completion(&sdd->xfer_completion);
- INIT_LIST_HEAD(&sdd->queue);
ret = devm_request_irq(&pdev->dev, irq, s3c64xx_spi_irq, 0,
"spi-s3c64xx", sdd);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi/s3c64xx: Remove unused message queue
2013-07-05 17:56 [PATCH] spi/s3c64xx: Remove unused message queue Mark Brown
@ 2013-07-05 23:54 ` Tomasz Figa
2013-07-24 13:18 ` Kukjin Kim
1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Figa @ 2013-07-05 23:54 UTC (permalink / raw)
To: Mark Brown; +Cc: Kukjin Kim, Grant Likely, linux-samsung-soc, Mark Brown
On Friday 05 of July 2013 18:56:33 Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> 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>
> ---
> drivers/spi/spi-s3c64xx.c | 21 ---------------------
> 1 file changed, 21 deletions(-)
>
Looks good to me.
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] spi/s3c64xx: Remove unused message queue
2013-07-05 17:56 [PATCH] spi/s3c64xx: Remove unused message queue Mark Brown
2013-07-05 23:54 ` Tomasz Figa
@ 2013-07-24 13:18 ` Kukjin Kim
1 sibling, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2013-07-24 13:18 UTC (permalink / raw)
To: 'Mark Brown', 'Grant Likely'
Cc: linux-samsung-soc, 'Mark Brown'
Mark Brown wrote:
>
> From: Mark Brown <broonie@linaro.org>
>
> 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>
- Kukjin
> ---
> drivers/spi/spi-s3c64xx.c | 21 ---------------------
> 1 file changed, 21 deletions(-)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index eb53df2..def13e8 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -172,7 +172,6 @@ struct s3c64xx_spi_port_config {
> * @master: Pointer to the SPI Protocol master.
> * @cntrlr_info: Platform specific data for the controller this driver
> manages.
> * @tgl_spi: Pointer to the last CS left untoggled by the cs_change hint.
> - * @queue: To log SPI xfer requests.
> * @lock: Controller specific lock.
> * @state: Set of FLAGS to indicate status.
> * @rx_dmach: Controller's DMA channel for Rx.
> @@ -193,7 +192,6 @@ struct s3c64xx_spi_driver_data {
> struct spi_master *master;
> struct s3c64xx_spi_info *cntrlr_info;
> struct spi_device *tgl_spi;
> - struct list_head queue;
> spinlock_t lock;
> unsigned long sfr_start;
> struct completion xfer_completion;
> @@ -1053,8 +1051,6 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
> struct s3c64xx_spi_csinfo *cs = spi->controller_data;
> struct s3c64xx_spi_driver_data *sdd;
> struct s3c64xx_spi_info *sci;
> - struct spi_message *msg;
> - unsigned long flags;
> int err;
>
> sdd = spi_master_get_devdata(spi->master);
> @@ -1085,21 +1081,6 @@ static int s3c64xx_spi_setup(struct spi_device
*spi)
>
> sci = sdd->cntrlr_info;
>
> - spin_lock_irqsave(&sdd->lock, flags);
> -
> - list_for_each_entry(msg, &sdd->queue, queue) {
> - /* Is some mssg is already queued for this device */
> - if (msg->spi == spi) {
> - dev_err(&spi->dev,
> - "setup: attempt while mssg in queue!\n");
> - spin_unlock_irqrestore(&sdd->lock, flags);
> - err = -EBUSY;
> - goto err_msgq;
> - }
> - }
> -
> - spin_unlock_irqrestore(&sdd->lock, flags);
> -
> pm_runtime_get_sync(&sdd->pdev->dev);
>
> /* Check if we can provide the requested rate */
> @@ -1146,7 +1127,6 @@ setup_exit:
> /* setup() returns with device de-selected */
> disable_cs(sdd, spi);
>
> -err_msgq:
> gpio_free(cs->line);
> spi_set_ctldata(spi, NULL);
>
> @@ -1439,7 +1419,6 @@ static int s3c64xx_spi_probe(struct platform_device
> *pdev)
>
> spin_lock_init(&sdd->lock);
> init_completion(&sdd->xfer_completion);
> - INIT_LIST_HEAD(&sdd->queue);
>
> ret = devm_request_irq(&pdev->dev, irq, s3c64xx_spi_irq, 0,
> "spi-s3c64xx", sdd);
> --
> 1.8.3.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-24 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 17:56 [PATCH] spi/s3c64xx: Remove unused message queue Mark Brown
2013-07-05 23:54 ` Tomasz Figa
2013-07-24 13:18 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox