Skip to content

Commit c252b8c

Browse files
committed
Merge tag 'regmap-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "This just contains a few small fixes, there's been no substantial development on regmap this release cycle" * tag 'regmap-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: use int type to store negative error codes regmap: Remove superfluous check for !config in __regmap_init() regmap: mmio: Add missing MODULE_DESCRIPTION()
2 parents d5f7411 + f4672dc commit c252b8c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

drivers/base/regmap/regmap-mmio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,4 +609,5 @@ void regmap_mmio_detach_clk(struct regmap *map)
609609
}
610610
EXPORT_SYMBOL_GPL(regmap_mmio_detach_clk);
611611

612+
MODULE_DESCRIPTION("regmap MMIO Module");
612613
MODULE_LICENSE("GPL v2");

drivers/base/regmap/regmap.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ struct regmap *__regmap_init(struct device *dev,
827827
map->read_flag_mask = bus->read_flag_mask;
828828
}
829829

830-
if (config && config->read && config->write) {
830+
if (config->read && config->write) {
831831
map->reg_read = _regmap_bus_read;
832832
if (config->reg_update_bits)
833833
map->reg_update_bits = config->reg_update_bits;
@@ -2258,12 +2258,14 @@ EXPORT_SYMBOL_GPL(regmap_field_update_bits_base);
22582258
* @field: Register field to operate on
22592259
* @bits: Bits to test
22602260
*
2261-
* Returns -1 if the underlying regmap_field_read() fails, 0 if at least one of the
2262-
* tested bits is not set and 1 if all tested bits are set.
2261+
* Returns negative errno if the underlying regmap_field_read() fails,
2262+
* 0 if at least one of the tested bits is not set and 1 if all tested
2263+
* bits are set.
22632264
*/
22642265
int regmap_field_test_bits(struct regmap_field *field, unsigned int bits)
22652266
{
2266-
unsigned int val, ret;
2267+
unsigned int val;
2268+
int ret;
22672269

22682270
ret = regmap_field_read(field, &val);
22692271
if (ret)
@@ -3309,7 +3311,8 @@ EXPORT_SYMBOL_GPL(regmap_update_bits_base);
33093311
*/
33103312
int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits)
33113313
{
3312-
unsigned int val, ret;
3314+
unsigned int val;
3315+
int ret;
33133316

33143317
ret = regmap_read(map, reg, &val);
33153318
if (ret)

0 commit comments

Comments
 (0)