Perform minor cleanup of this function, fix datatype and add kerneldoc. Signed-off-by: Marek Vasut <marex@denx.de>