I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of the code, thus, I suggest replacing the numeric parameter with the macro. Signed-off-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx> Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx> --- drivers/platform/x86/compal-laptop.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c index e1c2b6d..eaa3ecb 100644 --- a/drivers/platform/x86/compal-laptop.c +++ b/drivers/platform/x86/compal-laptop.c @@ -680,17 +680,17 @@ static int bat_writeable_property(struct power_supply *psy, /* Driver Globals */ /* ============== */ static DEVICE_ATTR(wake_up_pme, - 0644, wake_up_pme_show, wake_up_pme_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_pme_show, wake_up_pme_store); static DEVICE_ATTR(wake_up_modem, - 0644, wake_up_modem_show, wake_up_modem_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_modem_show, wake_up_modem_store); static DEVICE_ATTR(wake_up_lan, - 0644, wake_up_lan_show, wake_up_lan_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_lan_show, wake_up_lan_store); static DEVICE_ATTR(wake_up_wlan, - 0644, wake_up_wlan_show, wake_up_wlan_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_wlan_show, wake_up_wlan_store); static DEVICE_ATTR(wake_up_key, - 0644, wake_up_key_show, wake_up_key_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_key_show, wake_up_key_store); static DEVICE_ATTR(wake_up_mouse, - 0644, wake_up_mouse_show, wake_up_mouse_store); + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, wake_up_mouse_show, wake_up_mouse_store); static DEVICE_ATTR(fan1_input, S_IRUGO, fan_show, NULL); static DEVICE_ATTR(temp1_input, S_IRUGO, temp_cpu, NULL); -- 2.9.2 -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html