OSDN Git Service

Merge "msm: kgsl: Add missing check for snapshot IB dump"
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / pwm / sysfs.c
index 375008e..199370e 100644 (file)
@@ -340,19 +340,6 @@ void pwmchip_sysfs_export(struct pwm_chip *chip)
 void pwmchip_sysfs_unexport(struct pwm_chip *chip)
 {
        struct device *parent;
-
-       parent = class_find_device(&pwm_class, NULL, chip,
-                                  pwmchip_sysfs_match);
-       if (parent) {
-               /* for class_find_device() */
-               put_device(parent);
-               device_unregister(parent);
-       }
-}
-
-void pwmchip_sysfs_unexport_children(struct pwm_chip *chip)
-{
-       struct device *parent;
        unsigned int i;
 
        parent = class_find_device(&pwm_class, NULL, chip,
@@ -368,6 +355,7 @@ void pwmchip_sysfs_unexport_children(struct pwm_chip *chip)
        }
 
        put_device(parent);
+       device_unregister(parent);
 }
 
 static int __init pwm_sysfs_init(void)