Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: ab8500: Remove ab8500_regulator_of_probe()

Now this is a DT-only driver because non-devicetree probe path is removed,
so merge ab8500_regulator_of_probe() into ab8500_regulator_probe().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Axel Lin and committed by
Mark Brown
a5c1a416 7171511e

+12 -19
+12 -19
drivers/regulator/ab8500.c
··· 3037 3037 return 0; 3038 3038 } 3039 3039 3040 - static int 3041 - ab8500_regulator_of_probe(struct platform_device *pdev, 3042 - struct device_node *np) 3043 - { 3044 - struct of_regulator_match *match = abx500_regulator.match; 3045 - int err, i; 3046 - 3047 - for (i = 0; i < abx500_regulator.info_size; i++) { 3048 - err = ab8500_regulator_register( 3049 - pdev, match[i].init_data, i, match[i].of_node); 3050 - if (err) 3051 - return err; 3052 - } 3053 - 3054 - return 0; 3055 - } 3056 - 3057 3040 static int ab8500_regulator_probe(struct platform_device *pdev) 3058 3041 { 3059 3042 struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent); 3060 3043 struct device_node *np = pdev->dev.of_node; 3061 - int err; 3044 + struct of_regulator_match *match; 3045 + int err, i; 3062 3046 3063 3047 if (!ab8500) { 3064 3048 dev_err(&pdev->dev, "null mfd parent\n"); ··· 3059 3075 "Error parsing regulator init data: %d\n", err); 3060 3076 return err; 3061 3077 } 3062 - return ab8500_regulator_of_probe(pdev, np); 3078 + 3079 + match = abx500_regulator.match; 3080 + for (i = 0; i < abx500_regulator.info_size; i++) { 3081 + err = ab8500_regulator_register(pdev, match[i].init_data, i, 3082 + match[i].of_node); 3083 + if (err) 3084 + return err; 3085 + } 3086 + 3087 + return 0; 3063 3088 } 3064 3089 3065 3090 static int ab8500_regulator_remove(struct platform_device *pdev)