Re: linux-next: manual merge of the mfd tree with Linus' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stephen,

On 18 September 2012 11:19, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> Hi Samuel,
>
> Today's linux-next merge of the mfd tree got a conflict in
> drivers/regulator/anatop-regulator.c between commit 3e2a928472da
> ("regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel") from
> Linus' tree and commit baa64151aecc ("regulator: anatop-regulator:
> Convert to use syscon to access anatop register") from the mfd tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
>
> --
> Cheers,
> Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
>
> diff --cc drivers/regulator/anatop-regulator.c
> index ce0fe72,596535d..0000000
> --- a/drivers/regulator/anatop-regulator.c
> +++ b/drivers/regulator/anatop-regulator.c
> @@@ -61,18 -64,17 +64,18 @@@ static int anatop_regmap_set_voltage_se
>         return 0;
>   }
>
> - static int anatop_get_voltage_sel(struct regulator_dev *reg)
> + static int anatop_regmap_get_voltage_sel(struct regulator_dev *reg)
>   {
>         struct anatop_regulator *anatop_reg = rdev_get_drvdata(reg);
>  -      u32 val;
>  +      u32 val, mask;
>
>         if (!anatop_reg->control_reg)
>                 return -ENOTSUPP;
>
> -       val = anatop_read_reg(anatop_reg->mfd, anatop_reg->control_reg);
> +       regmap_read(anatop_reg->anatop, anatop_reg->control_reg, &val);
>  -      val = (val & ((1 << anatop_reg->vol_bit_width) - 1)) >>
>  +      mask = ((1 << anatop_reg->vol_bit_width) - 1) <<
>                 anatop_reg->vol_bit_shift;
>  +      val = (val & mask) >> anatop_reg->vol_bit_shift;
>
>         return val - anatop_reg->min_bit_val;
>   }

The fix looks ok to me.

Regards
Dong Aisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux