input: misc: Changed sysfs permissions
Sumit Sharma [Thu, 13 Dec 2012 09:41:27 +0000 (14:41 +0530)]
Allow only root to write in sysfs

Bug 1179366

Change-Id: I6afffb8fbc9a2ef1b18d730c8b5d39ed0fd383ee
Signed-off-by: Sumit Sharma <sumsharma@nvidia.com>
Reviewed-on: http://git-master/r/170927
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/input/misc/max77665_haptic.c

index a0678c0..eb1cb17 100644 (file)
@@ -356,17 +356,17 @@ static ssize_t max77665_haptic_vibrator_ctrl(struct device *dev,
        return count;
 }
 
-static DEVICE_ATTR(pattern_cycle, 0666, max77665_haptic_show,
+static DEVICE_ATTR(pattern_cycle, 0640, max77665_haptic_show,
                                        max77665_haptic_store);
-static DEVICE_ATTR(pattern_signal_period, 0666, max77665_haptic_show,
+static DEVICE_ATTR(pattern_signal_period, 0640, max77665_haptic_show,
                                        max77665_haptic_store);
-static DEVICE_ATTR(feedback_duty_cycle, 0666, max77665_haptic_show,
+static DEVICE_ATTR(feedback_duty_cycle, 0640, max77665_haptic_show,
                                        max77665_haptic_store);
-static DEVICE_ATTR(scf_val, 0666, max77665_haptic_show,
+static DEVICE_ATTR(scf_val, 0640, max77665_haptic_show,
                                        max77665_haptic_store);
-static DEVICE_ATTR(pwm_divisor, 0666, max77665_haptic_show,
+static DEVICE_ATTR(pwm_divisor, 0640, max77665_haptic_show,
                                        max77665_haptic_store);
-static DEVICE_ATTR(vibrator_enable, 0644, NULL,
+static DEVICE_ATTR(vibrator_enable, 0640, NULL,
                                        max77665_haptic_vibrator_ctrl);
 
 static struct attribute *max77665_haptics_attr[] = {