aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/serial-uclass.c
diff options
context:
space:
mode:
authorSimon Glass2015-02-27 22:06:32 -0700
committerSimon Glass2015-04-23 09:05:52 -0600
commit66312374dca86e77fc9b08f774546e62b6cd1aa7 (patch)
tree2a26f0695511a13329ca8469fcadfcf417003f79 /drivers/serial/serial-uclass.c
parent7f9875e733b79556ade508b88f88ac1f8a2c7e3c (diff)
dm: Add a panic_str() function to reduce code size
The printf() in panic() adds about 1.5KB of code size to SPL when compiled with Thumb-2. Provide a smaller version that does not support printf()-style arguments and use it in two commonly compiled places. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial-uclass.c')
-rw-r--r--drivers/serial/serial-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index b239691efe9..b8c2f482288 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -70,7 +70,7 @@ static void serial_find_console_or_panic(void)
if (uclass_get_device_by_seq(UCLASS_SERIAL, INDEX, &dev) &&
uclass_get_device(UCLASS_SERIAL, INDEX, &dev) &&
(uclass_first_device(UCLASS_SERIAL, &dev) || !dev))
- panic("No serial driver found");
+ panic_str("No serial driver found");
#undef INDEX
gd->cur_serial_dev = dev;
}