Module Name: src Committed By: bouyer Date: Tue Mar 6 17:24:57 UTC 2018
Modified Files: src/sys/dev/fdt: fdt_regulator.c Log Message: I guess fdtbus_regulator_get_voltage() should check for the get_voltage() callback, not set_voltage() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/fdt_regulator.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/fdt/fdt_regulator.c diff -u src/sys/dev/fdt/fdt_regulator.c:1.4 src/sys/dev/fdt/fdt_regulator.c:1.5 --- src/sys/dev/fdt/fdt_regulator.c:1.4 Fri Sep 22 15:33:21 2017 +++ src/sys/dev/fdt/fdt_regulator.c Tue Mar 6 17:24:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_regulator.c,v 1.4 2017/09/22 15:33:21 jmcneill Exp $ */ +/* $NetBSD: fdt_regulator.c,v 1.5 2018/03/06 17:24:57 bouyer Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fdt_regulator.c,v 1.4 2017/09/22 15:33:21 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_regulator.c,v 1.5 2018/03/06 17:24:57 bouyer Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -150,7 +150,7 @@ fdtbus_regulator_get_voltage(struct fdtb { struct fdtbus_regulator_controller *rc = reg->reg_rc; - if (rc->rc_funcs->set_voltage == NULL) + if (rc->rc_funcs->get_voltage == NULL) return EINVAL; return rc->rc_funcs->get_voltage(rc->rc_dev, puvol);