Skip to content
Browse files

Relocated s2w_switch within sysfs to /sys/android_touch/sweep2wake as…

… suggested by show-p.

showp1984 :

It would be better to use android_touch_kobj for this, since it is only a subscript of the touchdriver.
(/sys/android_touch/sweep2wake)
  • Loading branch information...
1 parent 5ada081 commit bd4f2dadd8040e55c162a117f92fca57117e1c14 @yank555-lu yank555-lu committed with
View
2 drivers/input/touchscreen/cy8c_tma_ts.c
@@ -636,7 +636,7 @@ static ssize_t cy8c_hw_reset(struct device *dev,
static DEVICE_ATTR(hw_reset, S_IWUSR,
NULL, cy8c_hw_reset);
-static struct kobject *android_touch_kobj;
+struct kobject *android_touch_kobj;
static int cy8c_touch_sysfs_init(void)
{
View
2 drivers/input/touchscreen/s2w-switch.c
@@ -48,7 +48,7 @@ int s2w_switch_init(void)
{
int retval;
- s2w_switch_kobj = kobject_create_and_add("sweep2wake", kernel_kobj);
+ s2w_switch_kobj = kobject_create_and_add("sweep2wake", android_touch_kobj);
if (!s2w_switch_kobj) {
return -ENOMEM;
}
View
3 include/linux/s2w-switch.h
@@ -16,3 +16,6 @@
extern int s2w_switch;
+/* The global /sys/android_touch/ kobject for people to chain off of */
+extern struct kobject *android_touch_kobj;
+

0 comments on commit bd4f2da

Please sign in to comment.
Something went wrong with that request. Please try again.