summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-02-02 20:40:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-02-04 11:11:35 +0100
commit582523142975c7993af81ff8007ff8e0e96f6dee (patch)
tree42e3e840486d70f317274b60d9f44f0ca3090511 /drivers/mfd
parent576d407abb53cf73e211f5eb67bf6c1e2d7cf731 (diff)
downloadbarebox-582523142975c7993af81ff8007ff8e0e96f6dee.tar.gz
barebox-582523142975c7993af81ff8007ff8e0e96f6dee.tar.xz
printk: port over Linux print_hex_dump_bytes/print_hex_dump_debug
print_hex_dump in barebox always prints a hex dump. Most users use it for debugging though, so import Linux helpers to do so to cut down on the #ifdef DEBUG. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/rave-sp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index 8fc46b66bb..ef569dd513 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -269,9 +269,8 @@ static int rave_sp_write(struct rave_sp *sp, const u8 *data, u8 data_size)
length = dest - frame;
- if (IS_ENABLED(DEBUG))
- print_hex_dump(0, "rave-sp tx: ", DUMP_PREFIX_NONE,
- 16, 1, frame, length, false);
+ print_hex_dump_debug("rave-sp tx: ", DUMP_PREFIX_NONE, 16, 1,
+ frame, length, false);
return serdev_device_write(sp->serdev, frame, length, SECOND);
}
@@ -406,9 +405,8 @@ static void rave_sp_receive_frame(struct rave_sp *sp,
struct device_d *dev = sp->serdev->dev;
u8 crc_calculated[checksum_length];
- if (IS_ENABLED(DEBUG))
- print_hex_dump(0, "rave-sp rx: ", DUMP_PREFIX_NONE,
- 16, 1, data, length, false);
+ print_hex_dump_debug("rave-sp rx: ", DUMP_PREFIX_NONE, 16, 1,
+ data, length, false);
if (unlikely(length <= checksum_length)) {
dev_warn(dev, "Dropping short frame\n");