Merge remote-tracking branch 'regmap/fix/field' into regmap-linus

This commit is contained in:
Mark Brown 2015-06-17 17:40:07 +01:00
Родитель 5934590796 921cc29473
Коммит d2b923ef7b
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -945,11 +945,10 @@ EXPORT_SYMBOL_GPL(devm_regmap_init);
static void regmap_field_init(struct regmap_field *rm_field,
struct regmap *regmap, struct reg_field reg_field)
{
int field_bits = reg_field.msb - reg_field.lsb + 1;
rm_field->regmap = regmap;
rm_field->reg = reg_field.reg;
rm_field->shift = reg_field.lsb;
rm_field->mask = ((BIT(field_bits) - 1) << reg_field.lsb);
rm_field->mask = GENMASK(reg_field.msb, reg_field.lsb);
rm_field->id_size = reg_field.id_size;
rm_field->id_offset = reg_field.id_offset;
}