diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-04-23 07:19:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 16:24:00 -0400 |
commit | 449a2bf5e881b2a00d42a7c0baa67119c8cb5dce (patch) | |
tree | 2332c49efb737ed3033b180567afcc2c8938eb8c /drivers/extcon/extcon_class.c | |
parent | 3e971dbc7e716a92e68ad4757193f3c10efdaba9 (diff) |
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/extcon_class.c')
-rw-r--r-- | drivers/extcon/extcon_class.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 3bc4b8af46cf..dbd3bfba42da 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c | |||
@@ -65,9 +65,9 @@ const char *extcon_cable_name[] = { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct class *extcon_class; | 67 | struct class *extcon_class; |
68 | #if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH) | 68 | #if defined(CONFIG_ANDROID) |
69 | static struct class_compat *switch_class; | 69 | static struct class_compat *switch_class; |
70 | #endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */ | 70 | #endif /* CONFIG_ANDROID */ |
71 | 71 | ||
72 | static LIST_HEAD(extcon_dev_list); | 72 | static LIST_HEAD(extcon_dev_list); |
73 | static DEFINE_MUTEX(extcon_dev_list_lock); | 73 | static DEFINE_MUTEX(extcon_dev_list_lock); |
@@ -532,11 +532,11 @@ static int create_extcon_class(void) | |||
532 | return PTR_ERR(extcon_class); | 532 | return PTR_ERR(extcon_class); |
533 | extcon_class->dev_attrs = extcon_attrs; | 533 | extcon_class->dev_attrs = extcon_attrs; |
534 | 534 | ||
535 | #if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH) | 535 | #if defined(CONFIG_ANDROID) |
536 | switch_class = class_compat_register("switch"); | 536 | switch_class = class_compat_register("switch"); |
537 | if (WARN(!switch_class, "cannot allocate")) | 537 | if (WARN(!switch_class, "cannot allocate")) |
538 | return -ENOMEM; | 538 | return -ENOMEM; |
539 | #endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */ | 539 | #endif /* CONFIG_ANDROID */ |
540 | } | 540 | } |
541 | 541 | ||
542 | return 0; | 542 | return 0; |
@@ -749,11 +749,11 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev) | |||
749 | put_device(edev->dev); | 749 | put_device(edev->dev); |
750 | goto err_dev; | 750 | goto err_dev; |
751 | } | 751 | } |
752 | #if defined(CONFIG_ANDROID) && !defined(CONFIG_ANDROID_SWITCH) | 752 | #if defined(CONFIG_ANDROID) |
753 | if (switch_class) | 753 | if (switch_class) |
754 | ret = class_compat_create_link(switch_class, edev->dev, | 754 | ret = class_compat_create_link(switch_class, edev->dev, |
755 | dev); | 755 | dev); |
756 | #endif /* CONFIG_ANDROID && !defined(CONFIG_ANDROID_SWITCH) */ | 756 | #endif /* CONFIG_ANDROID */ |
757 | 757 | ||
758 | spin_lock_init(&edev->lock); | 758 | spin_lock_init(&edev->lock); |
759 | 759 | ||