mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
pwm: Set class for exported channels in sysfs
Notifications for devices without bus or class set get dropped by dev_uevent_filter(). Adding the class to the exported child matches what the GPIO subsystem is doing. With this change exporting a channel triggers a udev event, which gives userspace a chance to fixup permissions and makes it possible for non-root users to make use of the PWM subsystem. Signed-off-by: Gottfried Haider <[email protected]> CC: Thierry Reding <[email protected]> CC: H Hartley Sweeten <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected] Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
4fbd8d194f
commit
7e5d1fd75c
1 changed files with 1 additions and 0 deletions
|
|
@ -263,6 +263,7 @@ static int pwm_export_child(struct device *parent, struct pwm_device *pwm)
|
|||
export->pwm = pwm;
|
||||
mutex_init(&export->lock);
|
||||
|
||||
export->child.class = parent->class;
|
||||
export->child.release = pwm_export_release;
|
||||
export->child.parent = parent;
|
||||
export->child.devt = MKDEV(0, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue