From 83f2e2a985ed10785f90cc60ef2f8f0c599e7ffb Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 18 Apr 2017 10:15:12 +0900 Subject: [PATCH] usb: gadget: slp: fix to use arm system_serial if no dmi serial From ARM system, system_serial is identical serial number. So, this patch fixes to use arm system_serial as serial of lagacy slp usb gadget instead of fixed serial if there is no dmi serial value. Change-Id: Ie28c6c3d2afc54fc1ea54d3eb67100d3ed27165d Signed-off-by: Seung-Woo Kim --- drivers/usb/gadget/legacy/slp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/legacy/slp.c b/drivers/usb/gadget/legacy/slp.c index cc76cee..1eeca11 100644 --- a/drivers/usb/gadget/legacy/slp.c +++ b/drivers/usb/gadget/legacy/slp.c @@ -32,6 +32,10 @@ #include #include +#ifdef CONFIG_ARM +#include +#endif + #include "../function/f_sdb.c" #include "../function/f_mtp.c" #include "../function/f_acm.c" @@ -1200,7 +1204,12 @@ static int slp_multi_bind(struct usb_composite_dev *cdev) if (serial) snprintf(serial_string, 18, "%s", serial); else +#ifdef CONFIG_ARM + snprintf(serial_string, 18, "%s", + system_serial); +#else snprintf(serial_string, 18, "%s", "01234TEST"); +#endif id = usb_string_id(cdev); if (id < 0) -- 2.7.4