lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346267110-29479-1-git-send-email-anish198519851985@gmail.com>
Date:	Thu, 30 Aug 2012 00:35:09 +0530
From:	anish kumar <anish198519851985@...il.com>
To:	cw00.choi@...sung.com, myungjoo.ham@...sung.com
Cc:	linux-kernel@...r.kernel.org,
	anish kumar <anish198519851985@...il.com>
Subject: [PATCH 1/2] [1/2]extcon: standard cable names definition and declaration changed

From: anish kumar <anish198519851985@...il.com>

With this change now individual drivers can use standard cable
names as below:
static const char *arizona_cable[] = {
    extcon_cable_name[EXTCON_USB],
    extcon_cable_name[EXTCON_USB_HOST],
    "CUSTOM_CABLE"
    NULL,
}

Signed-off-by: anish kumar <anish198519851985@...il.com>
---
 drivers/extcon/extcon-class.c |    4 +---
 include/linux/extcon.h        |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
index 481cfa0..e09a6c3 100644
--- a/drivers/extcon/extcon-class.c
+++ b/drivers/extcon/extcon-class.c
@@ -41,7 +41,7 @@
  * every single port-type of the following cable names. Please choose cable
  * names that are actually used in your extcon device.
  */
-const char *extcon_cable_name[] = {
+const char extcon_cable_name[][CABLE_NAME_MAX + 1] = {
 	[EXTCON_USB]		= "USB",
 	[EXTCON_USB_HOST]	= "USB-Host",
 	[EXTCON_TA]		= "TA",
@@ -62,8 +62,6 @@ const char *extcon_cable_name[] = {
 	[EXTCON_VIDEO_IN]	= "Video-in",
 	[EXTCON_VIDEO_OUT]	= "Video-out",
 	[EXTCON_MECHANICAL]	= "Mechanical",
-
-	NULL,
 };
 
 static struct class *extcon_class;
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index cdd4014..96b5450 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -68,7 +68,7 @@ enum extcon_cable_name {
 	EXTCON_VIDEO_OUT,
 	EXTCON_MECHANICAL,
 };
-extern const char *extcon_cable_name[];
+extern const char extcon_cable_name[][CABLE_NAME_MAX + 1];
 
 struct extcon_cable;
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ