linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]fix wrong sysfs file attribute
@ 2008-10-09  5:31 Shaohua Li
  2008-10-09 15:45 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2008-10-09  5:31 UTC (permalink / raw)
  To: lkml; +Cc: Andrew Morton

This attribute just has write operation.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 drivers/base/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/base/memory.c
===================================================================
--- linux.orig/drivers/base/memory.c	2008-10-09 11:41:40.000000000 +0800
+++ linux/drivers/base/memory.c	2008-10-09 11:41:52.000000000 +0800
@@ -325,7 +325,7 @@ memory_probe_store(struct class *class, 
 
 	return count;
 }
-static CLASS_ATTR(probe, 0700, NULL, memory_probe_store);
+static CLASS_ATTR(probe, 0200, NULL, memory_probe_store);
 
 static int memory_probe_init(void)
 {



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch]fix wrong sysfs file attribute
  2008-10-09  5:31 [patch]fix wrong sysfs file attribute Shaohua Li
@ 2008-10-09 15:45 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2008-10-09 15:45 UTC (permalink / raw)
  To: Shaohua Li; +Cc: lkml, Andrew Morton

On Thu, 09 Oct 2008 13:31:22 +0800 Shaohua Li wrote:

> This attribute just has write operation.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---
>  drivers/base/memory.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/base/memory.c
> ===================================================================
> --- linux.orig/drivers/base/memory.c	2008-10-09 11:41:40.000000000 +0800
> +++ linux/drivers/base/memory.c	2008-10-09 11:41:52.000000000 +0800
> @@ -325,7 +325,7 @@ memory_probe_store(struct class *class, 
>  
>  	return count;
>  }
> -static CLASS_ATTR(probe, 0700, NULL, memory_probe_store);
> +static CLASS_ATTR(probe, 0200, NULL, memory_probe_store);
>  
>  static int memory_probe_init(void)
>  {

#include <stat.h>

+static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);

is almost readable.

---
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-09 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-09  5:31 [patch]fix wrong sysfs file attribute Shaohua Li
2008-10-09 15:45 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).