FROMGIT: mmc-utils: lsmmc: Reuse do_read_reg

All 3 register parsing: CID, CSD, and CSR follow the same structure -
reuse it instead of duplicating the code 3 times. No functional change.

Link: https://lore.kernel.org/r/20230926100006.1789276-2-avri.altman@wdc.com
(cherry picked from commit 80271e9a6fd0db9cb3a85d024664da886e94315c
 https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git master)

BUG=None
TEST=compile

Change-Id: Icf9f477ab44f8a25d37e0c9ef0a0ad21512534a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mmc-utils/+/6193478
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Alexis Savery <asavery@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
1 file changed