Re: [PATCH] regulators: Add missing dummy definition for regulator_list_voltage
From: Suzuki K. Poulose
Date: Fri Jul 10 2015 - 11:14:37 EST
On 07/07/15 13:38, Mark Brown wrote:
On Fri, Jun 26, 2015 at 12:06:50PM +0100, Suzuki K. Poulose wrote:
+static inline int regulator_list_voltage(struct regulator *regulator, unsigned selector)
+{
+ return 0;
+}
I'd expect this stub to return -EINVAL since the voltage count should be
zero for !REGULATOR (since we obviously can't count the number of
voltages).
You are right, -EINVAL suites better. There are some users of the
API who consider 0 as invalid, but -EINVAL sounds better and covers
all the existing uses. Will resend the patch.
Thanks
Suzuki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/