UPSTREAM: extcon: Move struct extcon_cable from header file to core
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 27 Jun 2016 10:17:06 +0000 (19:17 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 3 Aug 2016 01:38:19 +0000 (09:38 +0800)
This patch moves the struct extcon_cable because that should
be only handled by extcon core. There are no reason to publish
the internal structure.

Change-Id: I7b2e68487ad0ddfa8a2342e7754f16af8623aa58
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit 20f7b53dfc24e0caa984087691af82e442229680)

drivers/extcon/extcon.c
include/linux/extcon.h

index 3c3bdc0c2aa9ae7be093060530a98779dfd0ccb6..7538a0ac7eed0d65ba1ec30563261999ddeb55a0 100644 (file)
@@ -77,6 +77,26 @@ static const char *extcon_name[] =  {
        NULL,
 };
 
+/**
+ * struct extcon_cable - An internal data for each cable of extcon device.
+ * @edev:              The extcon device
+ * @cable_index:       Index of this cable in the edev
+ * @attr_g:            Attribute group for the cable
+ * @attr_name:         "name" sysfs entry
+ * @attr_state:                "state" sysfs entry
+ * @attrs:             Array pointing to attr_name and attr_state for attr_g
+ */
+struct extcon_cable {
+       struct extcon_dev *edev;
+       int cable_index;
+
+       struct attribute_group attr_g;
+       struct device_attribute attr_name;
+       struct device_attribute attr_state;
+
+       struct attribute *attrs[3]; /* to be fed to attr_g.attrs */
+};
+
 static struct class *extcon_class;
 #if defined(CONFIG_ANDROID)
 static struct class_compat *switch_class;
index cec5c543afc61e7a2ef3c5319d054303df6d7e33..1b2c8b6809ccc371ca1b1513157a42b81d9b95c3 100644 (file)
@@ -126,26 +126,6 @@ struct extcon_dev {
        struct device_attribute *d_attrs_muex;
 };
 
-/**
- * struct extcon_cable - An internal data for each cable of extcon device.
- * @edev:              The extcon device
- * @cable_index:       Index of this cable in the edev
- * @attr_g:            Attribute group for the cable
- * @attr_name:         "name" sysfs entry
- * @attr_state:                "state" sysfs entry
- * @attrs:             Array pointing to attr_name and attr_state for attr_g
- */
-struct extcon_cable {
-       struct extcon_dev *edev;
-       int cable_index;
-
-       struct attribute_group attr_g;
-       struct device_attribute attr_name;
-       struct device_attribute attr_state;
-
-       struct attribute *attrs[3]; /* to be fed to attr_g.attrs */
-};
-
 #if IS_ENABLED(CONFIG_EXTCON)
 
 /*