Re: [PATCH 3/8] regulator: arizona-ldo1: Move setup processing from arizona-core

From: Mark Brown
Date: Tue Mar 18 2014 - 07:11:19 EST


On Tue, Mar 18, 2014 at 10:49:12AM +0000, Charles Keepax wrote:

> +#ifdef CONFIG_OF
> +static int arizona_ldo1_get_pdata(struct arizona *arizona,
> + struct regulator_config *config)
> +{
> + arizona_of_get_named_gpio(arizona, "wlf,ldoena", true,
> + &config->ena_gpio);
> +
> + return 0;
> +}
> +#else
> +static inline int arizona_ldo1_get_pdata(struct arizona *arizona,
> + struct regulator_config *config)
> +{
> + struct arizona_pdata *pdata = &arizona->pdata;
> +
> + config->ena_gpio = arizona->pdata.ldoena;

This breaks non-DT systems booting a kernel which has DT support
compiled in. It's also more than simple code motion which is what the
changelog claimed this was doing.

Attachment: signature.asc
Description: Digital signature