patrykk / linux-udoo

Udoo Linux Kernel
Other
29 stars 6 forks source link

max17135-regulator.c does not compile #7

Closed chrta closed 9 years ago

chrta commented 9 years ago

The file max17135-regulator.c does not compile when compiling the kernel in yocto 1.8. The following patch fixed the compilation issue, but it is untested, especially the &max17135_reg[i].

--- a/drivers/regulator/max17135-regulator.c
+++ b/drivers/regulator/max17135-regulator.c
@@ -602,7 +602,8 @@

        rdata->id = i;
        rdata->initdata = of_get_regulator_init_data(&pdev->dev,
-                                reg_np);
+                                pdev->dev.of_node,
+                                &max17135_reg[i]);
        rdata->reg_node = reg_np;
        rdata++;
    }
@@ -812,7 +813,7 @@
        if (!*opt)
            continue;
        if (!strncmp(opt, "pass=", 5)) {
-           ret = strict_strtoul(opt + 5, 0, &max17135_pass_num);
+           ret = kstrtoul(opt + 5, 0, &max17135_pass_num);
            if (ret < 0)
                return ret;
        }
@@ -820,7 +821,7 @@
            int offs = 5;
            if (opt[5] == '-')
                offs = 6;
-           ret = strict_strtoul(opt + offs, 0,
+           ret = kstrtoul(opt + offs, 0,
                (long *)&max17135_vcom);
            if (ret < 0)
                return ret;
patrykk commented 9 years ago

Hi, Thanks for your help, I'll add to the kernel tree your path because I havent tested yet this regulator with kernel 4.0. Could you make some more tests?

chrta commented 9 years ago

Hello, the kernel compiles with this configuration: https://github.com/chrta/meta-ronga-udoo/blob/fido_qt5_image/recipes-kernel/linux/linux-udoo-4.0/defconfig I will run the image on the udoo, as soon as i have access to the hardware (next week).

patrykk commented 9 years ago

I have made some tests and It should works stable.