]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
extcon: standard cable names definition and declaration changed
authoranish kumar <anish198519851985@gmail.com>
Wed, 29 Aug 2012 19:05:09 +0000 (00:35 +0530)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 22 Oct 2012 02:28:10 +0000 (11:28 +0900)
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@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/extcon/extcon-class.c
include/linux/extcon.h

index 946a3188b2b78a4014f84e93588e8423c41501c0..1e1a3f17a7828895df6d2cfaac8f984ce393c093 100644 (file)
@@ -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;
index 7443a560c9d059d106e7ce18dcf8813b18502c65..2c26c14cd7100d79ff046b9187409e2f430571eb 100644 (file)
@@ -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;