Commit f1e79f4b authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: refactor SDIO read/write helpers

Driver SDIO code uses helper functions to do IO to the SDIO
device. Current helpers handle IO of a single byte as well as
multi-byte. Driver predominately uses single byte IO. If the
common case is made simple it simplifies the whole driver. The common
case can be made simple by splitting the multi-byte and single byte
calls into separate functions, i.e 4 functions in total, read single
byte, read multi-byte, write single byte, write multi-byte.

Also, we need to handle the debug code. Currently debug calls after
read/write fail access the IO buffer. This buffer, at best, does not hold
useful data on the error path, at worst is uninitialized and holds
garbage.

Split read/write helper functions into two functions each, one for
single byte IO and one for multi-byte IO. Fix all call sites. Do not
change the program logic.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a9d58d9a
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment