* [PATCH 0/2] spi: rspi: Misc Cleanups
@ 2014-06-06 11:38 Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-06-06 11:38 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-sh, Geert Uytterhoeven
Hi Mark,
Here are two small cleanups for the Renesas SPI driver.
I've been hiding in a brown paper bag, as the first one fixes an unused
variable warning introduced by me in last patch of the previous series.
[1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one()
[2/2] spi: rspi: Pass spi_master pointer to rspi_release_dma()
drivers/spi/spi-rspi.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
Thanks for applying!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one()
2014-06-06 11:38 [PATCH 0/2] spi: rspi: Misc Cleanups Geert Uytterhoeven
@ 2014-06-06 11:38 ` Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 2/2] spi: rspi: Pass spi_master pointer to rspi_release_dma() Geert Uytterhoeven
2014-06-06 11:43 ` [PATCH 0/2] spi: rspi: Misc Cleanups Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-06-06 11:38 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-sh, Geert Uytterhoeven
Introduced by commit 8b983e90ea1a3dd82070f96c062ad521a06b7cc0 ("spi: rspi:
Extract rspi_common_transfer()"), which removed its users.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/spi/spi-rspi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 10112745bb17..ddee9df1547d 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -630,7 +630,6 @@ static int rspi_rz_transfer_one(struct spi_master *master,
struct spi_transfer *xfer)
{
struct rspi_data *rspi = spi_master_get_devdata(master);
- int ret;
rspi_rz_receive_init(rspi);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] spi: rspi: Pass spi_master pointer to rspi_release_dma()
2014-06-06 11:38 [PATCH 0/2] spi: rspi: Misc Cleanups Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Geert Uytterhoeven
@ 2014-06-06 11:38 ` Geert Uytterhoeven
2014-06-06 11:43 ` [PATCH 0/2] spi: rspi: Misc Cleanups Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-06-06 11:38 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-sh, Geert Uytterhoeven
rspi_release_dma() doesn't need access to any fields in the driver private
data, except for the pointer to the SPI master object. Hence just pass the
needed pointer.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/spi/spi-rspi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index ddee9df1547d..38fd938d6360 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -926,19 +926,19 @@ static int rspi_request_dma(struct device *dev, struct spi_master *master,
return 0;
}
-static void rspi_release_dma(struct rspi_data *rspi)
+static void rspi_release_dma(struct spi_master *master)
{
- if (rspi->master->dma_tx)
- dma_release_channel(rspi->master->dma_tx);
- if (rspi->master->dma_rx)
- dma_release_channel(rspi->master->dma_rx);
+ if (master->dma_tx)
+ dma_release_channel(master->dma_tx);
+ if (master->dma_rx)
+ dma_release_channel(master->dma_rx);
}
static int rspi_remove(struct platform_device *pdev)
{
struct rspi_data *rspi = platform_get_drvdata(pdev);
- rspi_release_dma(rspi);
+ rspi_release_dma(rspi->master);
pm_runtime_disable(&pdev->dev);
return 0;
@@ -1140,7 +1140,7 @@ static int rspi_probe(struct platform_device *pdev)
return 0;
error3:
- rspi_release_dma(rspi);
+ rspi_release_dma(master);
error2:
pm_runtime_disable(&pdev->dev);
error1:
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] spi: rspi: Misc Cleanups
2014-06-06 11:38 [PATCH 0/2] spi: rspi: Misc Cleanups Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 2/2] spi: rspi: Pass spi_master pointer to rspi_release_dma() Geert Uytterhoeven
@ 2014-06-06 11:43 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-06-06 11:43 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-spi, linux-sh, Geert Uytterhoeven
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
On Fri, Jun 06, 2014 at 01:38:41PM +0200, Geert Uytterhoeven wrote:
> Hi Mark,
>
> Here are two small cleanups for the Renesas SPI driver.
>
> I've been hiding in a brown paper bag, as the first one fixes an unused
> variable warning introduced by me in last patch of the previous series.
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-06 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-06 11:38 [PATCH 0/2] spi: rspi: Misc Cleanups Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 1/2] spi: rspi: Remove unused variable in rspi_rz_transfer_one() Geert Uytterhoeven
2014-06-06 11:38 ` [PATCH 2/2] spi: rspi: Pass spi_master pointer to rspi_release_dma() Geert Uytterhoeven
2014-06-06 11:43 ` [PATCH 0/2] spi: rspi: Misc Cleanups Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).