summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2012-04-23 20:19:57 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-23 13:24:00 -0700
commit449a2bf5e881b2a00d42a7c0baa67119c8cb5dce (patch)
tree2332c49efb737ed3033b180567afcc2c8938eb8c /drivers/extcon
parent3e971dbc7e716a92e68ad4757193f3c10efdaba9 (diff)
downloadop-kernel-dev-449a2bf5e881b2a00d42a7c0baa67119c8cb5dce.zip
op-kernel-dev-449a2bf5e881b2a00d42a7c0baa67119c8cb5dce.tar.gz
Remove "switch" class in drivers/staging/android/switch
Because extcon can also be a switch class for legacy userspace (Android) and is a superset of switch class in drivers/staging/android/switch, switch class may be removed. - Remove switch class - Remove switch class consideration in extcon class Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon_class.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
index 3bc4b8a..dbd3bfb 100644
--- a/drivers/extcon/extcon_class.c
+++ b/drivers/extcon/extcon_class.c
@@ -65,9 +65,9 @@ const char *extcon_cable_name[] = {
};
struct class *extcon_class;
-#if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH)
+#if defined(CONFIG_ANDROID)
static struct class_compat *switch_class;
-#endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */
+#endif /* CONFIG_ANDROID */
static LIST_HEAD(extcon_dev_list);
static DEFINE_MUTEX(extcon_dev_list_lock);
@@ -532,11 +532,11 @@ static int create_extcon_class(void)
return PTR_ERR(extcon_class);
extcon_class->dev_attrs = extcon_attrs;
-#if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH)
+#if defined(CONFIG_ANDROID)
switch_class = class_compat_register("switch");
if (WARN(!switch_class, "cannot allocate"))
return -ENOMEM;
-#endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */
+#endif /* CONFIG_ANDROID */
}
return 0;
@@ -749,11 +749,11 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev)
put_device(edev->dev);
goto err_dev;
}
-#if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH)
+#if defined(CONFIG_ANDROID)
if (switch_class)
ret = class_compat_create_link(switch_class, edev->dev,
dev);
-#endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */
+#endif /* CONFIG_ANDROID */
spin_lock_init(&edev->lock);
OpenPOWER on IntegriCloud