Re: [PATCH 3/3] ux500: add ab8500-regulators machine specific data

From: Mark Brown
Date: Tue Jul 13 2010 - 06:00:22 EST


On Tue, Jul 13, 2010 at 11:51:30AM +0530, Sundar Iyer wrote:

> +static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
> + { .dev = NULL, .supply = "vaux1", },
> +};

All these supplies with NULL devices are bogus, supplies are in terms of
the device being supplied not the labels on the board. If you've got a
supply with no device and the name of the supply on either the regulator
or the board you're most likely doing it wrong. The only exception is
for supplies used in cpufreq since we don't have a struct device we can
use there.

> +struct regulator_init_data ab8500_vaux2_regulator = {
> + .supply_regulator_dev = NULL,
> + .constraints = {
> + .name = "ab8500-vaux2",
> + .min_uV = AB8500_VAUXN_LDO_MIN_VOLTAGE,
> + .max_uV = AB8500_VAUXN_LDO_MAX_VOLTAGE,

I'm not convinced that these #defines help anything, they're used in
exactly one place so don't add much to either legibility or ease of
maintinance.
--
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/