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 <[email protected]>
Signed-off-by: Baole Ni <[email protected]>
---
 drivers/pcmcia/rsrc_nonstatic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 5ef7b46..8e13692 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -1119,7 +1119,7 @@ static ssize_t store_io_db(struct device *dev,
 
        return ret ? ret : count;
 }
-static DEVICE_ATTR(available_resources_io, 0600, show_io_db, store_io_db);
+static DEVICE_ATTR(available_resources_io, S_IRUSR | S_IWUSR, show_io_db, 
store_io_db);
 
 static ssize_t show_mem_db(struct device *dev,
                           struct device_attribute *attr, char *buf)
@@ -1185,7 +1185,7 @@ static ssize_t store_mem_db(struct device *dev,
 
        return ret ? ret : count;
 }
-static DEVICE_ATTR(available_resources_mem, 0600, show_mem_db, store_mem_db);
+static DEVICE_ATTR(available_resources_mem, S_IRUSR | S_IWUSR, show_mem_db, 
store_mem_db);
 
 static struct attribute *pccard_rsrc_attributes[] = {
        &dev_attr_available_resources_io.attr,
-- 
2.9.2


_______________________________________________
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

Reply via email to