summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2017-04-18 10:15:12 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2019-01-29 11:25:36 +0900
commit83f2e2a985ed10785f90cc60ef2f8f0c599e7ffb (patch)
tree197c8866aea6f8011c7f424fa3c9b43641727a57
parentcc2d1ea393db4cd131ef9790252197a9a8e0360a (diff)
downloadlinux-artik7-83f2e2a985ed10785f90cc60ef2f8f0c599e7ffb.tar.gz
linux-artik7-83f2e2a985ed10785f90cc60ef2f8f0c599e7ffb.tar.bz2
linux-artik7-83f2e2a985ed10785f90cc60ef2f8f0c599e7ffb.zip
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 <sw0312.kim@samsung.com>
-rw-r--r--drivers/usb/gadget/legacy/slp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/legacy/slp.c b/drivers/usb/gadget/legacy/slp.c
index cc76ceec0f97..1eeca11682ee 100644
--- a/drivers/usb/gadget/legacy/slp.c
+++ b/drivers/usb/gadget/legacy/slp.c
@@ -32,6 +32,10 @@
#include <linux/usb/composite.h>
#include <linux/usb/gadget.h>
+#ifdef CONFIG_ARM
+#include <asm/system_info.h>
+#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)