summaryrefslogtreecommitdiff
path: root/drivers/mfd/hi6421-pmic-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/hi6421-pmic-core.c')
-rw-r--r--drivers/mfd/hi6421-pmic-core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mfd/hi6421-pmic-core.c b/drivers/mfd/hi6421-pmic-core.c
index a6a890537a1e..5af24a438329 100644
--- a/drivers/mfd/hi6421-pmic-core.c
+++ b/drivers/mfd/hi6421-pmic-core.c
@@ -15,8 +15,9 @@
#include <linux/mfd/core.h>
#include <linux/mfd/hi6421-pmic.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
static const struct mfd_cell hi6421_devs[] = {
@@ -50,16 +51,12 @@ MODULE_DEVICE_TABLE(of, of_hi6421_pmic_match);
static int hi6421_pmic_probe(struct platform_device *pdev)
{
struct hi6421_pmic *pmic;
- const struct of_device_id *id;
const struct mfd_cell *subdevs;
enum hi6421_type type;
void __iomem *base;
int n_subdevs, ret;
- id = of_match_device(of_hi6421_pmic_match, &pdev->dev);
- if (!id)
- return -EINVAL;
- type = (uintptr_t)id->data;
+ type = (uintptr_t)device_get_match_data(&pdev->dev);
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
if (!pmic)