Skip to content

Commit

Permalink
Remove "switch" class in drivers/staging/android/switch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MyungJoo Ham authored and Greg Kroah-Hartman committed Apr 23, 2012
1 parent 3e971db commit 449a2bf
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 424 deletions.
12 changes: 6 additions & 6 deletions drivers/extcon/extcon_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ config ANDROID_LOW_MEMORY_KILLER
---help---
Register processes to be killed when memory is low

source "drivers/staging/android/switch/Kconfig"

config ANDROID_INTF_ALARM
bool "Android alarm driver"
depends on RTC_CLASS
Expand All @@ -79,7 +77,6 @@ config ANDROID_ALARM_OLDDRV_COMPAT
Provides preprocessor alias to aid compatability with
older out-of-tree drivers that use the Android Alarm
in-kernel API. This will be removed eventually.

endif # if ANDROID

endmenu
1 change: 0 additions & 1 deletion drivers/staging/android/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ obj-$(CONFIG_ANDROID_RAM_CONSOLE) += ram_console.o
obj-$(CONFIG_ANDROID_TIMED_OUTPUT) += timed_output.o
obj-$(CONFIG_ANDROID_TIMED_GPIO) += timed_gpio.o
obj-$(CONFIG_ANDROID_LOW_MEMORY_KILLER) += lowmemorykiller.o
obj-$(CONFIG_ANDROID_SWITCH) += switch/
obj-$(CONFIG_ANDROID_INTF_ALARM) += alarm.o
obj-$(CONFIG_ANDROID_INTF_ALARM_DEV) += alarm-dev.o
11 changes: 0 additions & 11 deletions drivers/staging/android/switch/Kconfig

This file was deleted.

4 changes: 0 additions & 4 deletions drivers/staging/android/switch/Makefile

This file was deleted.

53 changes: 0 additions & 53 deletions drivers/staging/android/switch/switch.h

This file was deleted.

174 changes: 0 additions & 174 deletions drivers/staging/android/switch/switch_class.c

This file was deleted.

Loading

0 comments on commit 449a2bf

Please sign in to comment.