-
Notifications
You must be signed in to change notification settings - Fork 53.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mfd: hi6421-spmi-pmic: Cleanup drvdata to only include regmap
There are lots of fields in struct hi6421_spmi_pmic that aren't used. As a matter of fact, only regmap is needed. So, drop the struct as a whole, and set regmap as the drvdata. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/1828cb783b1ebca0b98bf0b3077d8701adb228f7.1630586862.git.mchehab+huawei@kernel.org
- Loading branch information
Showing
4 changed files
with
14 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
// Guodong Xu <[email protected]> | ||
|
||
#include <linux/delay.h> | ||
#include <linux/mfd/hi6421-spmi-pmic.h> | ||
#include <linux/module.h> | ||
#include <linux/of.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/regmap.h> | ||
#include <linux/regulator/driver.h> | ||
|
@@ -237,7 +237,7 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev) | |
struct hi6421_spmi_reg_priv *priv; | ||
struct hi6421_spmi_reg_info *info; | ||
struct device *dev = &pdev->dev; | ||
struct hi6421_spmi_pmic *pmic; | ||
struct regmap *regmap; | ||
struct regulator_dev *rdev; | ||
int i; | ||
|
||
|
@@ -246,8 +246,8 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev) | |
* which should first set drvdata. If this doesn't happen, hit | ||
* a warn on and return. | ||
*/ | ||
pmic = dev_get_drvdata(pmic_dev); | ||
if (WARN_ON(!pmic)) | ||
regmap = dev_get_drvdata(pmic_dev); | ||
if (WARN_ON(!regmap)) | ||
return -ENODEV; | ||
|
||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); | ||
|
@@ -261,7 +261,7 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev) | |
|
||
config.dev = pdev->dev.parent; | ||
config.driver_data = priv; | ||
config.regmap = pmic->regmap; | ||
config.regmap = regmap; | ||
|
||
rdev = devm_regulator_register(dev, &info->desc, &config); | ||
if (IS_ERR(rdev)) { | ||
|
This file was deleted.
Oops, something went wrong.