lkml.org 
[lkml]   [2012]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] mfd: mc13xxx-spi: Convert to devm_regmap_init_spi()
Date
From: Fabio Estevam <fabio.estevam@freescale.com>

Current code misses a "regmap_exit(mc13xxx->regmap)" in the error and remove paths.

Converting to devm_regmap_init_i2c() makes the regmap_exit unnecessary.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mfd/mc13xxx-spi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index 3fcdab3..62e537b 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -78,7 +78,7 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
mc13xxx->dev = &spi->dev;
mutex_init(&mc13xxx->lock);

- mc13xxx->regmap = regmap_init_spi(spi, &mc13xxx_regmap_spi_config);
+ mc13xxx->regmap = devm_regmap_init_spi(spi, &mc13xxx_regmap_spi_config);
if (IS_ERR(mc13xxx->regmap)) {
ret = PTR_ERR(mc13xxx->regmap);
dev_err(mc13xxx->dev, "Failed to initialize register map: %d\n",
--
1.7.1


\
 
 \ /
  Last update: 2012-06-09 08:01    [from the cache]
©2003-2011 Jasper Spaans