[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1371025543-4485-1-git-send-email-sachin.kamat@linaro.org>
Date: Wed, 12 Jun 2013 13:55:43 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: lee.jones@...aro.org, sameo@...ux.intel.com,
sachin.kamat@...aro.org
Subject: [PATCH 1/1] mfd: 88pm860x: Use devm_regmap_init_i2c()
devm_regmap_init_i2c() is device managed and makes cleanup simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
---
drivers/mfd/88pm860x-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index ef6d82c..eeb481d 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -1156,7 +1156,7 @@ static int pm860x_probe(struct i2c_client *client,
return -ENOMEM;
chip->id = verify_addr(client);
- chip->regmap = regmap_init_i2c(client, &pm860x_regmap_config);
+ chip->regmap = devm_regmap_init_i2c(client, &pm860x_regmap_config);
if (IS_ERR(chip->regmap)) {
ret = PTR_ERR(chip->regmap);
dev_err(&client->dev, "Failed to allocate register map: %d\n",
@@ -1203,7 +1203,6 @@ static int pm860x_remove(struct i2c_client *client)
regmap_exit(chip->regmap_companion);
i2c_unregister_device(chip->companion);
}
- regmap_exit(chip->regmap);
return 0;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists