diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-02 14:47:48 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-10-05 08:56:08 +0100 |
commit | e68ce0faf29c7c268666e11e95bf27dca97d28b0 (patch) | |
tree | 582e3b2edd661d6bf201f253ac5a14188961ba32 /drivers/misc/hi6421v600-irq.c | |
parent | 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f (diff) |
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 <mchehab+huawei@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/1828cb783b1ebca0b98bf0b3077d8701adb228f7.1630586862.git.mchehab+huawei@kernel.org
Diffstat (limited to 'drivers/misc/hi6421v600-irq.c')
-rw-r--r-- | drivers/misc/hi6421v600-irq.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c index 08535e97ff43..1c763796cf1f 100644 --- a/drivers/misc/hi6421v600-irq.c +++ b/drivers/misc/hi6421v600-irq.c @@ -10,7 +10,6 @@ #include <linux/bitops.h> #include <linux/interrupt.h> #include <linux/irq.h> -#include <linux/mfd/hi6421-spmi-pmic.h> #include <linux/module.h> #include <linux/of_gpio.h> #include <linux/platform_device.h> @@ -220,7 +219,7 @@ static int hi6421v600_irq_probe(struct platform_device *pdev) struct platform_device *pmic_pdev; struct device *dev = &pdev->dev; struct hi6421v600_irq *priv; - struct hi6421_spmi_pmic *pmic; + struct regmap *regmap; unsigned int virq; int i, ret; @@ -229,8 +228,8 @@ static int hi6421v600_irq_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); @@ -238,7 +237,7 @@ static int hi6421v600_irq_probe(struct platform_device *pdev) return -ENOMEM; priv->dev = dev; - priv->regmap = pmic->regmap; + priv->regmap = regmap; spin_lock_init(&priv->lock); |