Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8456aba1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "regmap: Quit the read-loop based on position of file-offset"

parents 576b0d31 40e7dc2f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -355,6 +355,9 @@ static ssize_t regmap_data_read_file(struct file *file, char __user *user_buf,
	else if (*ppos >= map->dump_address * map->debugfs_tot_len
			+ map->dump_count * map->debugfs_tot_len)
		return 0;
	else if (*ppos < map->dump_address * map->debugfs_tot_len)
		return 0;

	return regmap_read_debugfs(map, 0, map->max_register, user_buf,
			new_count, ppos);
}