Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138585
b: refs/heads/master
c: ec78c8a
h: refs/heads/master
i:
  138583: 9711032
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Mar 27, 2009
1 parent 77e0614 commit 21c7244
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efbda86098455da014be849713df6498cefc5a2a
refs/heads/master: ec78c8ac16e7a5f45e21838ab2f5573200bfcdd3
6 changes: 2 additions & 4 deletions trunk/arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,15 @@ void ppc_enable_pmcs(void)
}
EXPORT_SYMBOL(ppc_enable_pmcs);


#define SYSFS_PMCSETUP(NAME, ADDRESS) \
static void read_##NAME(void *val) \
{ \
mtspr(ADDRESS, *(unsigned long *)val); \
*(unsigned long *)val = mfspr(ADDRESS); \
} \
static unsigned long write_##NAME(unsigned long val) \
static void write_##NAME(void *val) \
{ \
ppc_enable_pmcs(); \
mtspr(ADDRESS, *(unsigned long *)val); \
return 0; \
} \
static ssize_t show_##NAME(struct sys_device *dev, \
struct sysdev_attribute *attr, \
Expand Down

0 comments on commit 21c7244

Please sign in to comment.