Message ID | 000301cebf4a$78d9d530$6a8d7f90$%han@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Acked-by: Sonic Zhang <sonic.zhang@analog.com> >-----Original Message----- >From: Jingoo Han [mailto:jg1.han@samsung.com] >Sent: Wednesday, October 02, 2013 4:36 PM >To: 'Chris Ball' >Cc: linux-mmc@vger.kernel.org; Zhang, Sonic; 'Jingoo Han' >Subject: [PATCH 2/2] mmc: mmc_spi: remove unnecessary spi_set_drvdata() > >The driver core clears the driver data to NULL after device_release or on probe >failure. Thus, it is not needed to manually clear the device driver data to NULL. > >Signed-off-by: Jingoo Han <jg1.han@samsung.com> >--- > drivers/mmc/host/mmc_spi.c | 2 -- > 1 file changed, 2 deletions(-) > >diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index >40770a5..4c5e279 100644 >--- a/drivers/mmc/host/mmc_spi.c >+++ b/drivers/mmc/host/mmc_spi.c >@@ -1472,7 +1472,6 @@ fail_glue_init: > fail_nobuf1: > mmc_free_host(mmc); > mmc_spi_put_pdata(spi); >- spi_set_drvdata(spi, NULL); > > nomem: > kfree(ones); >@@ -1507,7 +1506,6 @@ static int mmc_spi_remove(struct spi_device *spi) > spi->max_speed_hz = mmc->f_max; > mmc_free_host(mmc); > mmc_spi_put_pdata(spi); >- spi_set_drvdata(spi, NULL); > } > return 0; > } >-- >1.7.10.4 > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 40770a5..4c5e279 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -1472,7 +1472,6 @@ fail_glue_init: fail_nobuf1: mmc_free_host(mmc); mmc_spi_put_pdata(spi); - spi_set_drvdata(spi, NULL); nomem: kfree(ones); @@ -1507,7 +1506,6 @@ static int mmc_spi_remove(struct spi_device *spi) spi->max_speed_hz = mmc->f_max; mmc_free_host(mmc); mmc_spi_put_pdata(spi); - spi_set_drvdata(spi, NULL); } return 0; }
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> --- drivers/mmc/host/mmc_spi.c | 2 -- 1 file changed, 2 deletions(-)