--- zzzz-none-000/linux-3.10.107/drivers/regulator/ab3100.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/regulator/ab3100.c 2021-02-04 17:41:59.000000000 +0000 @@ -498,7 +498,7 @@ struct ab3100_platform_data *plfdata, struct regulator_init_data *init_data, struct device_node *np, - int id) + unsigned long id) { struct regulator_desc *desc; struct ab3100_regulator *reg; @@ -535,7 +535,7 @@ config.dev = &pdev->dev; config.driver_data = reg; - rdev = regulator_register(desc, &config); + rdev = devm_regulator_register(&pdev->dev, desc, &config); if (IS_ERR(rdev)) { err = PTR_ERR(rdev); dev_err(&pdev->dev, @@ -616,7 +616,6 @@ for (i = 0; i < AB3100_NUM_REGULATORS; i++) { struct ab3100_regulator *reg = &ab3100_regulators[i]; - regulator_unregister(reg->rdev); reg->rdev = NULL; } return 0; @@ -647,7 +646,7 @@ err = ab3100_regulator_register( pdev, NULL, ab3100_regulator_matches[i].init_data, ab3100_regulator_matches[i].of_node, - (int) ab3100_regulator_matches[i].driver_data); + (unsigned long)ab3100_regulator_matches[i].driver_data); if (err) { ab3100_regulators_remove(pdev); return err; @@ -660,7 +659,7 @@ static int ab3100_regulators_probe(struct platform_device *pdev) { - struct ab3100_platform_data *plfdata = pdev->dev.platform_data; + struct ab3100_platform_data *plfdata = dev_get_platdata(&pdev->dev); struct device_node *np = pdev->dev.of_node; int err = 0; u8 data; @@ -722,7 +721,6 @@ static struct platform_driver ab3100_regulators_driver = { .driver = { .name = "ab3100-regulators", - .owner = THIS_MODULE, }, .probe = ab3100_regulators_probe, .remove = ab3100_regulators_remove,