File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -759,12 +759,11 @@ struct regmap *__regmap_init(struct device *dev,
759
759
760
760
map -> reg_base = config -> reg_base ;
761
761
762
- map -> format .reg_bytes = DIV_ROUND_UP (config -> reg_bits , 8 );
762
+ map -> format .reg_bytes = BITS_TO_BYTES (config -> reg_bits );
763
763
map -> format .pad_bytes = config -> pad_bits / 8 ;
764
764
map -> format .reg_shift = config -> reg_shift ;
765
- map -> format .val_bytes = DIV_ROUND_UP (config -> val_bits , 8 );
766
- map -> format .buf_size = DIV_ROUND_UP (config -> reg_bits +
767
- config -> val_bits + config -> pad_bits , 8 );
765
+ map -> format .val_bytes = BITS_TO_BYTES (config -> val_bits );
766
+ map -> format .buf_size = BITS_TO_BYTES (config -> reg_bits + config -> val_bits + config -> pad_bits );
768
767
map -> reg_shift = config -> pad_bits % 8 ;
769
768
if (config -> reg_stride )
770
769
map -> reg_stride = config -> reg_stride ;
You can’t perform that action at this time.
0 commit comments