[1/2] spi: sh-msiof: fix *info pointer in request_dma()
diff mbox series

Message ID 1547197109-637-1-git-send-email-na-hoan@jinso.co.jp
State New, archived
Headers show
Series
  • [1/2] spi: sh-msiof: fix *info pointer in request_dma()
Related show

Commit Message

グェン・アン・ホァン Jan. 11, 2019, 8:58 a.m. UTC
From: Hoan Nguyen An <na-hoan@jinso.co.jp>

msiof_spi_infor struct pointer was initialized in the probe() function,
no need to get back and keep consistency.

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
---
 drivers/spi/spi-sh-msiof.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sergei Shtylyov Jan. 11, 2019, 10:15 a.m. UTC | #1
Hello!

On 01/11/2019 11:58 AM, Nguyen An Hoan wrote:

> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> 
> msiof_spi_infor struct pointer was initialized in the probe() function,

   infor?

> no need to get back and keep consistency.
> 
> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
> ---
>  drivers/spi/spi-sh-msiof.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
> index d14b407..64adf34 100644
> --- a/drivers/spi/spi-sh-msiof.c
> +++ b/drivers/spi/spi-sh-msiof.c
[...]
> @@ -1469,3 +1469,4 @@ MODULE_DESCRIPTION("SuperH MSIOF SPI Master Interface Driver");
>  MODULE_AUTHOR("Magnus Damm");
>  MODULE_LICENSE("GPL v2");
>  MODULE_ALIAS("platform:spi_sh_msiof");
> +
> 

   Huh?

MBR, Sergei
Mark Brown Jan. 11, 2019, 1:26 p.m. UTC | #2
On Fri, Jan 11, 2019 at 05:58:28PM +0900, Nguyen An Hoan wrote:
> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> 
> msiof_spi_infor struct pointer was initialized in the probe() function,
> no need to get back and keep consistency.

These look good to me with the changes Geert and Sergei pointed out.

Patch
diff mbox series

diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index d14b407..64adf34 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -1206,7 +1206,7 @@  static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
 {
 	struct platform_device *pdev = p->pdev;
 	struct device *dev = &pdev->dev;
-	const struct sh_msiof_spi_info *info = dev_get_platdata(dev);
+	const struct sh_msiof_spi_info *info = p->info;
 	unsigned int dma_tx_id, dma_rx_id;
 	const struct resource *res;
 	struct spi_master *master;
@@ -1469,3 +1469,4 @@  MODULE_DESCRIPTION("SuperH MSIOF SPI Master Interface Driver");
 MODULE_AUTHOR("Magnus Damm");
 MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:spi_sh_msiof");
+