diff mbox

spi: fsl-dspi: remove useless code for dspi driver.

Message ID 1412825265-10221-1-git-send-email-Li.Xiubo@freescale.com (mailing list archive)
State Accepted
Commit 409851c38c742e56747b1911a5091e22b6c8514f
Headers show

Commit Message

Xiubo Li Oct. 9, 2014, 3:27 a.m. UTC
Since we are using regmap framework's internal locks, so the
lock_arg for dspi_regmap_config is redundant here.

This patch just remove it, and then the dspi_regmap_config could
be const type.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 drivers/spi/spi-fsl-dspi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown Oct. 13, 2014, 10:38 a.m. UTC | #1
On Thu, Oct 09, 2014 at 11:27:45AM +0800, Xiubo Li wrote:
> Since we are using regmap framework's internal locks, so the
> lock_arg for dspi_regmap_config is redundant here.
> 
> This patch just remove it, and then the dspi_regmap_config could
> be const type.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 4482160..12dc995 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -438,7 +438,7 @@  static int dspi_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
 
-static struct regmap_config dspi_regmap_config = {
+static const struct regmap_config dspi_regmap_config = {
 	.reg_bits = 32,
 	.val_bits = 32,
 	.reg_stride = 4,
@@ -492,7 +492,6 @@  static int dspi_probe(struct platform_device *pdev)
 		goto out_master_put;
 	}
 
-	dspi_regmap_config.lock_arg = dspi;
 	dspi->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dspi", base,
 						&dspi_regmap_config);
 	if (IS_ERR(dspi->regmap)) {