diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/avr32/kernel/cpu.c | 38 | ||||
-rw-r--r-- | arch/ia64/kernel/err_inject.c | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/cbe_thermal.c | 45 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 36 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 35 | ||||
-rw-r--r-- | arch/sh/drivers/dma/dma-sysfs.c | 15 | ||||
-rw-r--r-- | arch/sparc64/kernel/sysfs.c | 16 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/microcode.c | 10 |
13 files changed, 174 insertions, 80 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index cc5145b28e7f..368d171754cf 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -130,7 +130,9 @@ static const struct leds_evt_name evt_names[] = { | |||
130 | { "red", led_red_on, led_red_off }, | 130 | { "red", led_red_on, led_red_off }, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size) | 133 | static ssize_t leds_store(struct sys_device *dev, |
134 | struct sysdev_attribute *attr, | ||
135 | const char *buf, size_t size) | ||
134 | { | 136 | { |
135 | int ret = -EINVAL, len = strcspn(buf, " "); | 137 | int ret = -EINVAL, len = strcspn(buf, " "); |
136 | 138 | ||
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index b8409caeb23d..e84faffbbeca 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be | 26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be |
27 | * made, we must make sure that the code executes on the correct CPU. | 27 | * made, we must make sure that the code executes on the correct CPU. |
28 | */ | 28 | */ |
29 | static ssize_t show_pc0event(struct sys_device *dev, char *buf) | 29 | static ssize_t show_pc0event(struct sys_device *dev, |
30 | struct sysdev_attribute *attr, char *buf) | ||
30 | { | 31 | { |
31 | unsigned long pccr; | 32 | unsigned long pccr; |
32 | 33 | ||
33 | pccr = sysreg_read(PCCR); | 34 | pccr = sysreg_read(PCCR); |
34 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); | 35 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); |
35 | } | 36 | } |
36 | static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | 37 | static ssize_t store_pc0event(struct sys_device *dev, |
38 | struct sysdev_attribute *attr, const char *buf, | ||
37 | size_t count) | 39 | size_t count) |
38 | { | 40 | { |
39 | unsigned long val; | 41 | unsigned long val; |
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | |||
46 | sysreg_write(PCCR, val); | 48 | sysreg_write(PCCR, val); |
47 | return count; | 49 | return count; |
48 | } | 50 | } |
49 | static ssize_t show_pc0count(struct sys_device *dev, char *buf) | 51 | static ssize_t show_pc0count(struct sys_device *dev, |
52 | struct sysdev_attribute *attr, char *buf) | ||
50 | { | 53 | { |
51 | unsigned long pcnt0; | 54 | unsigned long pcnt0; |
52 | 55 | ||
53 | pcnt0 = sysreg_read(PCNT0); | 56 | pcnt0 = sysreg_read(PCNT0); |
54 | return sprintf(buf, "%lu\n", pcnt0); | 57 | return sprintf(buf, "%lu\n", pcnt0); |
55 | } | 58 | } |
56 | static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | 59 | static ssize_t store_pc0count(struct sys_device *dev, |
57 | size_t count) | 60 | struct sysdev_attribute *attr, |
61 | const char *buf, size_t count) | ||
58 | { | 62 | { |
59 | unsigned long val; | 63 | unsigned long val; |
60 | char *endp; | 64 | char *endp; |
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | |||
67 | return count; | 71 | return count; |
68 | } | 72 | } |
69 | 73 | ||
70 | static ssize_t show_pc1event(struct sys_device *dev, char *buf) | 74 | static ssize_t show_pc1event(struct sys_device *dev, |
75 | struct sysdev_attribute *attr, char *buf) | ||
71 | { | 76 | { |
72 | unsigned long pccr; | 77 | unsigned long pccr; |
73 | 78 | ||
74 | pccr = sysreg_read(PCCR); | 79 | pccr = sysreg_read(PCCR); |
75 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); | 80 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); |
76 | } | 81 | } |
77 | static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | 82 | static ssize_t store_pc1event(struct sys_device *dev, |
83 | struct sysdev_attribute *attr, const char *buf, | ||
78 | size_t count) | 84 | size_t count) |
79 | { | 85 | { |
80 | unsigned long val; | 86 | unsigned long val; |
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | |||
87 | sysreg_write(PCCR, val); | 93 | sysreg_write(PCCR, val); |
88 | return count; | 94 | return count; |
89 | } | 95 | } |
90 | static ssize_t show_pc1count(struct sys_device *dev, char *buf) | 96 | static ssize_t show_pc1count(struct sys_device *dev, |
97 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 98 | { |
92 | unsigned long pcnt1; | 99 | unsigned long pcnt1; |
93 | 100 | ||
94 | pcnt1 = sysreg_read(PCNT1); | 101 | pcnt1 = sysreg_read(PCNT1); |
95 | return sprintf(buf, "%lu\n", pcnt1); | 102 | return sprintf(buf, "%lu\n", pcnt1); |
96 | } | 103 | } |
97 | static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | 104 | static ssize_t store_pc1count(struct sys_device *dev, |
105 | struct sysdev_attribute *attr, const char *buf, | ||
98 | size_t count) | 106 | size_t count) |
99 | { | 107 | { |
100 | unsigned long val; | 108 | unsigned long val; |
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | |||
108 | return count; | 116 | return count; |
109 | } | 117 | } |
110 | 118 | ||
111 | static ssize_t show_pccycles(struct sys_device *dev, char *buf) | 119 | static ssize_t show_pccycles(struct sys_device *dev, |
120 | struct sysdev_attribute *attr, char *buf) | ||
112 | { | 121 | { |
113 | unsigned long pccnt; | 122 | unsigned long pccnt; |
114 | 123 | ||
115 | pccnt = sysreg_read(PCCNT); | 124 | pccnt = sysreg_read(PCCNT); |
116 | return sprintf(buf, "%lu\n", pccnt); | 125 | return sprintf(buf, "%lu\n", pccnt); |
117 | } | 126 | } |
118 | static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | 127 | static ssize_t store_pccycles(struct sys_device *dev, |
128 | struct sysdev_attribute *attr, const char *buf, | ||
119 | size_t count) | 129 | size_t count) |
120 | { | 130 | { |
121 | unsigned long val; | 131 | unsigned long val; |
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | |||
129 | return count; | 139 | return count; |
130 | } | 140 | } |
131 | 141 | ||
132 | static ssize_t show_pcenable(struct sys_device *dev, char *buf) | 142 | static ssize_t show_pcenable(struct sys_device *dev, |
143 | struct sysdev_attribute *attr, char *buf) | ||
133 | { | 144 | { |
134 | unsigned long pccr; | 145 | unsigned long pccr; |
135 | 146 | ||
136 | pccr = sysreg_read(PCCR); | 147 | pccr = sysreg_read(PCCR); |
137 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); | 148 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); |
138 | } | 149 | } |
139 | static ssize_t store_pcenable(struct sys_device *dev, const char *buf, | 150 | static ssize_t store_pcenable(struct sys_device *dev, |
151 | struct sysdev_attribute *attr, const char *buf, | ||
140 | size_t count) | 152 | size_t count) |
141 | { | 153 | { |
142 | unsigned long pccr, val; | 154 | unsigned long pccr, val; |
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c index b642648cc2ac..c539c689493b 100644 --- a/arch/ia64/kernel/err_inject.c +++ b/arch/ia64/kernel/err_inject.c | |||
@@ -55,7 +55,8 @@ static u64 resources[NR_CPUS]; | |||
55 | 55 | ||
56 | #define show(name) \ | 56 | #define show(name) \ |
57 | static ssize_t \ | 57 | static ssize_t \ |
58 | show_##name(struct sys_device *dev, char *buf) \ | 58 | show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ |
59 | char *buf) \ | ||
59 | { \ | 60 | { \ |
60 | u32 cpu=dev->id; \ | 61 | u32 cpu=dev->id; \ |
61 | return sprintf(buf, "%lx\n", name[cpu]); \ | 62 | return sprintf(buf, "%lx\n", name[cpu]); \ |
@@ -63,7 +64,8 @@ show_##name(struct sys_device *dev, char *buf) \ | |||
63 | 64 | ||
64 | #define store(name) \ | 65 | #define store(name) \ |
65 | static ssize_t \ | 66 | static ssize_t \ |
66 | store_##name(struct sys_device *dev, const char *buf, size_t size) \ | 67 | store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ |
68 | const char *buf, size_t size) \ | ||
67 | { \ | 69 | { \ |
68 | unsigned int cpu=dev->id; \ | 70 | unsigned int cpu=dev->id; \ |
69 | name[cpu] = simple_strtoull(buf, NULL, 16); \ | 71 | name[cpu] = simple_strtoull(buf, NULL, 16); \ |
@@ -76,7 +78,8 @@ show(call_start) | |||
76 | * processor. The cpu number in driver is only used for storing data. | 78 | * processor. The cpu number in driver is only used for storing data. |
77 | */ | 79 | */ |
78 | static ssize_t | 80 | static ssize_t |
79 | store_call_start(struct sys_device *dev, const char *buf, size_t size) | 81 | store_call_start(struct sys_device *dev, struct sysdev_attribute *attr, |
82 | const char *buf, size_t size) | ||
80 | { | 83 | { |
81 | unsigned int cpu=dev->id; | 84 | unsigned int cpu=dev->id; |
82 | unsigned long call_start = simple_strtoull(buf, NULL, 16); | 85 | unsigned long call_start = simple_strtoull(buf, NULL, 16); |
@@ -124,14 +127,16 @@ show(err_type_info) | |||
124 | store(err_type_info) | 127 | store(err_type_info) |
125 | 128 | ||
126 | static ssize_t | 129 | static ssize_t |
127 | show_virtual_to_phys(struct sys_device *dev, char *buf) | 130 | show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, |
131 | char *buf) | ||
128 | { | 132 | { |
129 | unsigned int cpu=dev->id; | 133 | unsigned int cpu=dev->id; |
130 | return sprintf(buf, "%lx\n", phys_addr[cpu]); | 134 | return sprintf(buf, "%lx\n", phys_addr[cpu]); |
131 | } | 135 | } |
132 | 136 | ||
133 | static ssize_t | 137 | static ssize_t |
134 | store_virtual_to_phys(struct sys_device *dev, const char *buf, size_t size) | 138 | store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, |
139 | const char *buf, size_t size) | ||
135 | { | 140 | { |
136 | unsigned int cpu=dev->id; | 141 | unsigned int cpu=dev->id; |
137 | u64 virt_addr=simple_strtoull(buf, NULL, 16); | 142 | u64 virt_addr=simple_strtoull(buf, NULL, 16); |
@@ -154,7 +159,8 @@ show(err_struct_info) | |||
154 | store(err_struct_info) | 159 | store(err_struct_info) |
155 | 160 | ||
156 | static ssize_t | 161 | static ssize_t |
157 | show_err_data_buffer(struct sys_device *dev, char *buf) | 162 | show_err_data_buffer(struct sys_device *dev, |
163 | struct sysdev_attribute *attr, char *buf) | ||
158 | { | 164 | { |
159 | unsigned int cpu=dev->id; | 165 | unsigned int cpu=dev->id; |
160 | 166 | ||
@@ -165,7 +171,9 @@ show_err_data_buffer(struct sys_device *dev, char *buf) | |||
165 | } | 171 | } |
166 | 172 | ||
167 | static ssize_t | 173 | static ssize_t |
168 | store_err_data_buffer(struct sys_device *dev, const char *buf, size_t size) | 174 | store_err_data_buffer(struct sys_device *dev, |
175 | struct sysdev_attribute *attr, | ||
176 | const char *buf, size_t size) | ||
169 | { | 177 | { |
170 | unsigned int cpu=dev->id; | 178 | unsigned int cpu=dev->id; |
171 | int ret; | 179 | int ret; |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index c8127f832df0..aba0ba95f062 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -28,7 +28,9 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
28 | /* Time in microseconds we delay before sleeping in the idle loop */ | 28 | /* Time in microseconds we delay before sleeping in the idle loop */ |
29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; | 29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; |
30 | 30 | ||
31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | 31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, |
32 | struct sysdev_attribute *attr, | ||
33 | const char *buf, | ||
32 | size_t count) | 34 | size_t count) |
33 | { | 35 | { |
34 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 36 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
@@ -44,7 +46,9 @@ static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | |||
44 | return count; | 46 | return count; |
45 | } | 47 | } |
46 | 48 | ||
47 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, char *buf) | 49 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, |
50 | struct sysdev_attribute *attr, | ||
51 | char *buf) | ||
48 | { | 52 | { |
49 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 53 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
50 | 54 | ||
@@ -152,14 +156,17 @@ static unsigned long write_##NAME(unsigned long val) \ | |||
152 | mtspr(ADDRESS, val); \ | 156 | mtspr(ADDRESS, val); \ |
153 | return 0; \ | 157 | return 0; \ |
154 | } \ | 158 | } \ |
155 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 159 | static ssize_t show_##NAME(struct sys_device *dev, \ |
160 | struct sysdev_attribute *attr, \ | ||
161 | char *buf) \ | ||
156 | { \ | 162 | { \ |
157 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 163 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
158 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ | 164 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ |
159 | return sprintf(buf, "%lx\n", val); \ | 165 | return sprintf(buf, "%lx\n", val); \ |
160 | } \ | 166 | } \ |
161 | static ssize_t __used \ | 167 | static ssize_t __used \ |
162 | store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ | 168 | store_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, \ |
169 | const char *buf, size_t count) \ | ||
163 | { \ | 170 | { \ |
164 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 171 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
165 | unsigned long val; \ | 172 | unsigned long val; \ |
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index 4852bf312d83..4d4c8c169124 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c | |||
@@ -97,7 +97,8 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom | |||
97 | return value.spe[spu->spe_id]; | 97 | return value.spe[spu->spe_id]; |
98 | } | 98 | } |
99 | 99 | ||
100 | static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) | 100 | static ssize_t spu_show_temp(struct sys_device *sysdev, struct sysdev_attribute *attr, |
101 | char *buf) | ||
101 | { | 102 | { |
102 | u8 value; | 103 | u8 value; |
103 | struct cbe_pmd_regs __iomem *pmd_regs; | 104 | struct cbe_pmd_regs __iomem *pmd_regs; |
@@ -146,32 +147,38 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem *pmd_regs, const char | |||
146 | return size; | 147 | return size; |
147 | } | 148 | } |
148 | 149 | ||
149 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, char *buf) | 150 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, |
151 | struct sysdev_attribute *attr, char *buf) | ||
150 | { | 152 | { |
151 | return show_throttle(get_pmd_regs(sysdev), buf, 0); | 153 | return show_throttle(get_pmd_regs(sysdev), buf, 0); |
152 | } | 154 | } |
153 | 155 | ||
154 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, char *buf) | 156 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, |
157 | struct sysdev_attribute *attr, char *buf) | ||
155 | { | 158 | { |
156 | return show_throttle(get_pmd_regs(sysdev), buf, 8); | 159 | return show_throttle(get_pmd_regs(sysdev), buf, 8); |
157 | } | 160 | } |
158 | 161 | ||
159 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 162 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, |
163 | struct sysdev_attribute *attr, char *buf) | ||
160 | { | 164 | { |
161 | return show_throttle(get_pmd_regs(sysdev), buf, 16); | 165 | return show_throttle(get_pmd_regs(sysdev), buf, 16); |
162 | } | 166 | } |
163 | 167 | ||
164 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 168 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, |
169 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
165 | { | 170 | { |
166 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); | 171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); |
167 | } | 172 | } |
168 | 173 | ||
169 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 174 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, |
175 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
170 | { | 176 | { |
171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); | 177 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); |
172 | } | 178 | } |
173 | 179 | ||
174 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 180 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, |
181 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
175 | { | 182 | { |
176 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); | 183 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); |
177 | } | 184 | } |
@@ -192,43 +199,51 @@ static ssize_t ppe_show_temp(struct sys_device *sysdev, char *buf, int pos) | |||
192 | 199 | ||
193 | /* shows the temperature of the DTS on the PPE, | 200 | /* shows the temperature of the DTS on the PPE, |
194 | * located near the linear thermal sensor */ | 201 | * located near the linear thermal sensor */ |
195 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, char *buf) | 202 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, |
203 | struct sysdev_attribute *attr, char *buf) | ||
196 | { | 204 | { |
197 | return ppe_show_temp(sysdev, buf, 32); | 205 | return ppe_show_temp(sysdev, buf, 32); |
198 | } | 206 | } |
199 | 207 | ||
200 | /* shows the temperature of the second DTS on the PPE */ | 208 | /* shows the temperature of the second DTS on the PPE */ |
201 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, char *buf) | 209 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, |
210 | struct sysdev_attribute *attr, char *buf) | ||
202 | { | 211 | { |
203 | return ppe_show_temp(sysdev, buf, 0); | 212 | return ppe_show_temp(sysdev, buf, 0); |
204 | } | 213 | } |
205 | 214 | ||
206 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, char *buf) | 215 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, |
216 | struct sysdev_attribute *attr, char *buf) | ||
207 | { | 217 | { |
208 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); | 218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); |
209 | } | 219 | } |
210 | 220 | ||
211 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, char *buf) | 221 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, |
222 | struct sysdev_attribute *attr, char *buf) | ||
212 | { | 223 | { |
213 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); | 224 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); |
214 | } | 225 | } |
215 | 226 | ||
216 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 227 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, |
228 | struct sysdev_attribute *attr, char *buf) | ||
217 | { | 229 | { |
218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); | 230 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); |
219 | } | 231 | } |
220 | 232 | ||
221 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 233 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, |
234 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
222 | { | 235 | { |
223 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); | 236 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); |
224 | } | 237 | } |
225 | 238 | ||
226 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 239 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, |
240 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
227 | { | 241 | { |
228 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); | 242 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); |
229 | } | 243 | } |
230 | 244 | ||
231 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 245 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, |
246 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
232 | { | 247 | { |
233 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); | 248 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); |
234 | } | 249 | } |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 78f905bc6a42..a5bdb89a17c3 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -703,7 +703,8 @@ static unsigned long long spu_acct_time(struct spu *spu, | |||
703 | } | 703 | } |
704 | 704 | ||
705 | 705 | ||
706 | static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf) | 706 | static ssize_t spu_stat_show(struct sys_device *sysdev, |
707 | struct sysdev_attribute *attr, char *buf) | ||
707 | { | 708 | { |
708 | struct spu *spu = container_of(sysdev, struct spu, sysdev); | 709 | struct spu *spu = container_of(sysdev, struct spu, sysdev); |
709 | 710 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index b6781030cfbd..b795b3e24afd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -864,7 +864,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
864 | } | 864 | } |
865 | 865 | ||
866 | #ifdef CONFIG_HOTPLUG_CPU | 866 | #ifdef CONFIG_HOTPLUG_CPU |
867 | static ssize_t cpu_configure_show(struct sys_device *dev, char *buf) | 867 | static ssize_t cpu_configure_show(struct sys_device *dev, |
868 | struct sysdev_attribute *attr, char *buf) | ||
868 | { | 869 | { |
869 | ssize_t count; | 870 | ssize_t count; |
870 | 871 | ||
@@ -874,8 +875,9 @@ static ssize_t cpu_configure_show(struct sys_device *dev, char *buf) | |||
874 | return count; | 875 | return count; |
875 | } | 876 | } |
876 | 877 | ||
877 | static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, | 878 | static ssize_t cpu_configure_store(struct sys_device *dev, |
878 | size_t count) | 879 | struct sysdev_attribute *attr, |
880 | const char *buf, size_t count) | ||
879 | { | 881 | { |
880 | int cpu = dev->id; | 882 | int cpu = dev->id; |
881 | int val, rc; | 883 | int val, rc; |
@@ -922,7 +924,8 @@ out: | |||
922 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); | 924 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); |
923 | #endif /* CONFIG_HOTPLUG_CPU */ | 925 | #endif /* CONFIG_HOTPLUG_CPU */ |
924 | 926 | ||
925 | static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf) | 927 | static ssize_t cpu_polarization_show(struct sys_device *dev, |
928 | struct sysdev_attribute *attr, char *buf) | ||
926 | { | 929 | { |
927 | int cpu = dev->id; | 930 | int cpu = dev->id; |
928 | ssize_t count; | 931 | ssize_t count; |
@@ -950,7 +953,8 @@ static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf) | |||
950 | } | 953 | } |
951 | static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); | 954 | static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); |
952 | 955 | ||
953 | static ssize_t show_cpu_address(struct sys_device *dev, char *buf) | 956 | static ssize_t show_cpu_address(struct sys_device *dev, |
957 | struct sysdev_attribute *attr, char *buf) | ||
954 | { | 958 | { |
955 | return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); | 959 | return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); |
956 | } | 960 | } |
@@ -970,7 +974,8 @@ static struct attribute_group cpu_common_attr_group = { | |||
970 | .attrs = cpu_common_attrs, | 974 | .attrs = cpu_common_attrs, |
971 | }; | 975 | }; |
972 | 976 | ||
973 | static ssize_t show_capability(struct sys_device *dev, char *buf) | 977 | static ssize_t show_capability(struct sys_device *dev, |
978 | struct sysdev_attribute *attr, char *buf) | ||
974 | { | 979 | { |
975 | unsigned int capability; | 980 | unsigned int capability; |
976 | int rc; | 981 | int rc; |
@@ -982,7 +987,8 @@ static ssize_t show_capability(struct sys_device *dev, char *buf) | |||
982 | } | 987 | } |
983 | static SYSDEV_ATTR(capability, 0444, show_capability, NULL); | 988 | static SYSDEV_ATTR(capability, 0444, show_capability, NULL); |
984 | 989 | ||
985 | static ssize_t show_idle_count(struct sys_device *dev, char *buf) | 990 | static ssize_t show_idle_count(struct sys_device *dev, |
991 | struct sysdev_attribute *attr, char *buf) | ||
986 | { | 992 | { |
987 | struct s390_idle_data *idle; | 993 | struct s390_idle_data *idle; |
988 | unsigned long long idle_count; | 994 | unsigned long long idle_count; |
@@ -995,7 +1001,8 @@ static ssize_t show_idle_count(struct sys_device *dev, char *buf) | |||
995 | } | 1001 | } |
996 | static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); | 1002 | static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); |
997 | 1003 | ||
998 | static ssize_t show_idle_time(struct sys_device *dev, char *buf) | 1004 | static ssize_t show_idle_time(struct sys_device *dev, |
1005 | struct sysdev_attribute *attr, char *buf) | ||
999 | { | 1006 | { |
1000 | struct s390_idle_data *idle; | 1007 | struct s390_idle_data *idle; |
1001 | unsigned long long new_time; | 1008 | unsigned long long new_time; |
@@ -1112,7 +1119,9 @@ out: | |||
1112 | return rc; | 1119 | return rc; |
1113 | } | 1120 | } |
1114 | 1121 | ||
1115 | static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, | 1122 | static ssize_t __ref rescan_store(struct sys_device *dev, |
1123 | struct sysdev_attribute *attr, | ||
1124 | const char *buf, | ||
1116 | size_t count) | 1125 | size_t count) |
1117 | { | 1126 | { |
1118 | int rc; | 1127 | int rc; |
@@ -1123,7 +1132,9 @@ static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, | |||
1123 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); | 1132 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); |
1124 | #endif /* CONFIG_HOTPLUG_CPU */ | 1133 | #endif /* CONFIG_HOTPLUG_CPU */ |
1125 | 1134 | ||
1126 | static ssize_t dispatching_show(struct sys_device *dev, char *buf) | 1135 | static ssize_t dispatching_show(struct sys_device *dev, |
1136 | struct sysdev_attribute *attr, | ||
1137 | char *buf) | ||
1127 | { | 1138 | { |
1128 | ssize_t count; | 1139 | ssize_t count; |
1129 | 1140 | ||
@@ -1133,8 +1144,9 @@ static ssize_t dispatching_show(struct sys_device *dev, char *buf) | |||
1133 | return count; | 1144 | return count; |
1134 | } | 1145 | } |
1135 | 1146 | ||
1136 | static ssize_t dispatching_store(struct sys_device *dev, const char *buf, | 1147 | static ssize_t dispatching_store(struct sys_device *dev, |
1137 | size_t count) | 1148 | struct sysdev_attribute *attr, |
1149 | const char *buf, size_t count) | ||
1138 | { | 1150 | { |
1139 | int val, rc; | 1151 | int val, rc; |
1140 | char delim; | 1152 | char delim; |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index f2cede3947b2..ab70d9bd9261 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -1100,7 +1100,9 @@ static inline struct etr_aib *etr_aib_from_dev(struct sys_device *dev) | |||
1100 | return etr_port1_online ? &etr_port1 : NULL; | 1100 | return etr_port1_online ? &etr_port1 : NULL; |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static ssize_t etr_online_show(struct sys_device *dev, char *buf) | 1103 | static ssize_t etr_online_show(struct sys_device *dev, |
1104 | struct sysdev_attribute *attr, | ||
1105 | char *buf) | ||
1104 | { | 1106 | { |
1105 | unsigned int online; | 1107 | unsigned int online; |
1106 | 1108 | ||
@@ -1109,7 +1111,8 @@ static ssize_t etr_online_show(struct sys_device *dev, char *buf) | |||
1109 | } | 1111 | } |
1110 | 1112 | ||
1111 | static ssize_t etr_online_store(struct sys_device *dev, | 1113 | static ssize_t etr_online_store(struct sys_device *dev, |
1112 | const char *buf, size_t count) | 1114 | struct sysdev_attribute *attr, |
1115 | const char *buf, size_t count) | ||
1113 | { | 1116 | { |
1114 | unsigned int value; | 1117 | unsigned int value; |
1115 | 1118 | ||
@@ -1136,7 +1139,9 @@ static ssize_t etr_online_store(struct sys_device *dev, | |||
1136 | 1139 | ||
1137 | static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store); | 1140 | static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store); |
1138 | 1141 | ||
1139 | static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf) | 1142 | static ssize_t etr_stepping_control_show(struct sys_device *dev, |
1143 | struct sysdev_attribute *attr, | ||
1144 | char *buf) | ||
1140 | { | 1145 | { |
1141 | return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ? | 1146 | return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ? |
1142 | etr_eacr.e0 : etr_eacr.e1); | 1147 | etr_eacr.e0 : etr_eacr.e1); |
@@ -1144,7 +1149,8 @@ static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf) | |||
1144 | 1149 | ||
1145 | static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL); | 1150 | static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL); |
1146 | 1151 | ||
1147 | static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf) | 1152 | static ssize_t etr_mode_code_show(struct sys_device *dev, |
1153 | struct sysdev_attribute *attr, char *buf) | ||
1148 | { | 1154 | { |
1149 | if (!etr_port0_online && !etr_port1_online) | 1155 | if (!etr_port0_online && !etr_port1_online) |
1150 | /* Status word is not uptodate if both ports are offline. */ | 1156 | /* Status word is not uptodate if both ports are offline. */ |
@@ -1155,7 +1161,8 @@ static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf) | |||
1155 | 1161 | ||
1156 | static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL); | 1162 | static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL); |
1157 | 1163 | ||
1158 | static ssize_t etr_untuned_show(struct sys_device *dev, char *buf) | 1164 | static ssize_t etr_untuned_show(struct sys_device *dev, |
1165 | struct sysdev_attribute *attr, char *buf) | ||
1159 | { | 1166 | { |
1160 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1167 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1161 | 1168 | ||
@@ -1166,7 +1173,8 @@ static ssize_t etr_untuned_show(struct sys_device *dev, char *buf) | |||
1166 | 1173 | ||
1167 | static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL); | 1174 | static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL); |
1168 | 1175 | ||
1169 | static ssize_t etr_network_id_show(struct sys_device *dev, char *buf) | 1176 | static ssize_t etr_network_id_show(struct sys_device *dev, |
1177 | struct sysdev_attribute *attr, char *buf) | ||
1170 | { | 1178 | { |
1171 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1179 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1172 | 1180 | ||
@@ -1177,7 +1185,8 @@ static ssize_t etr_network_id_show(struct sys_device *dev, char *buf) | |||
1177 | 1185 | ||
1178 | static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL); | 1186 | static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL); |
1179 | 1187 | ||
1180 | static ssize_t etr_id_show(struct sys_device *dev, char *buf) | 1188 | static ssize_t etr_id_show(struct sys_device *dev, |
1189 | struct sysdev_attribute *attr, char *buf) | ||
1181 | { | 1190 | { |
1182 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1191 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1183 | 1192 | ||
@@ -1188,7 +1197,8 @@ static ssize_t etr_id_show(struct sys_device *dev, char *buf) | |||
1188 | 1197 | ||
1189 | static SYSDEV_ATTR(id, 0400, etr_id_show, NULL); | 1198 | static SYSDEV_ATTR(id, 0400, etr_id_show, NULL); |
1190 | 1199 | ||
1191 | static ssize_t etr_port_number_show(struct sys_device *dev, char *buf) | 1200 | static ssize_t etr_port_number_show(struct sys_device *dev, |
1201 | struct sysdev_attribute *attr, char *buf) | ||
1192 | { | 1202 | { |
1193 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1203 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1194 | 1204 | ||
@@ -1199,7 +1209,8 @@ static ssize_t etr_port_number_show(struct sys_device *dev, char *buf) | |||
1199 | 1209 | ||
1200 | static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL); | 1210 | static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL); |
1201 | 1211 | ||
1202 | static ssize_t etr_coupled_show(struct sys_device *dev, char *buf) | 1212 | static ssize_t etr_coupled_show(struct sys_device *dev, |
1213 | struct sysdev_attribute *attr, char *buf) | ||
1203 | { | 1214 | { |
1204 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1215 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1205 | 1216 | ||
@@ -1210,7 +1221,8 @@ static ssize_t etr_coupled_show(struct sys_device *dev, char *buf) | |||
1210 | 1221 | ||
1211 | static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL); | 1222 | static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL); |
1212 | 1223 | ||
1213 | static ssize_t etr_local_time_show(struct sys_device *dev, char *buf) | 1224 | static ssize_t etr_local_time_show(struct sys_device *dev, |
1225 | struct sysdev_attribute *attr, char *buf) | ||
1214 | { | 1226 | { |
1215 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1227 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1216 | 1228 | ||
@@ -1221,7 +1233,8 @@ static ssize_t etr_local_time_show(struct sys_device *dev, char *buf) | |||
1221 | 1233 | ||
1222 | static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL); | 1234 | static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL); |
1223 | 1235 | ||
1224 | static ssize_t etr_utc_offset_show(struct sys_device *dev, char *buf) | 1236 | static ssize_t etr_utc_offset_show(struct sys_device *dev, |
1237 | struct sysdev_attribute *attr, char *buf) | ||
1225 | { | 1238 | { |
1226 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1239 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1227 | 1240 | ||
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 51b57c0d1a3c..347ee11351ec 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c | |||
@@ -23,7 +23,8 @@ static struct sysdev_class dma_sysclass = { | |||
23 | }; | 23 | }; |
24 | EXPORT_SYMBOL(dma_sysclass); | 24 | EXPORT_SYMBOL(dma_sysclass); |
25 | 25 | ||
26 | static ssize_t dma_show_devices(struct sys_device *dev, char *buf) | 26 | static ssize_t dma_show_devices(struct sys_device *dev, |
27 | struct sysdev_attribute *attr, char *buf) | ||
27 | { | 28 | { |
28 | ssize_t len = 0; | 29 | ssize_t len = 0; |
29 | int i; | 30 | int i; |
@@ -57,13 +58,15 @@ static int __init dma_sysclass_init(void) | |||
57 | } | 58 | } |
58 | postcore_initcall(dma_sysclass_init); | 59 | postcore_initcall(dma_sysclass_init); |
59 | 60 | ||
60 | static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf) | 61 | static ssize_t dma_show_dev_id(struct sys_device *dev, |
62 | struct sysdev_attribute *attr, char *buf) | ||
61 | { | 63 | { |
62 | struct dma_channel *channel = to_dma_channel(dev); | 64 | struct dma_channel *channel = to_dma_channel(dev); |
63 | return sprintf(buf, "%s\n", channel->dev_id); | 65 | return sprintf(buf, "%s\n", channel->dev_id); |
64 | } | 66 | } |
65 | 67 | ||
66 | static ssize_t dma_store_dev_id(struct sys_device *dev, | 68 | static ssize_t dma_store_dev_id(struct sys_device *dev, |
69 | struct sysdev_attribute *attr, | ||
67 | const char *buf, size_t count) | 70 | const char *buf, size_t count) |
68 | { | 71 | { |
69 | struct dma_channel *channel = to_dma_channel(dev); | 72 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -74,6 +77,7 @@ static ssize_t dma_store_dev_id(struct sys_device *dev, | |||
74 | static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id); | 77 | static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id); |
75 | 78 | ||
76 | static ssize_t dma_store_config(struct sys_device *dev, | 79 | static ssize_t dma_store_config(struct sys_device *dev, |
80 | struct sysdev_attribute *attr, | ||
77 | const char *buf, size_t count) | 81 | const char *buf, size_t count) |
78 | { | 82 | { |
79 | struct dma_channel *channel = to_dma_channel(dev); | 83 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -87,13 +91,15 @@ static ssize_t dma_store_config(struct sys_device *dev, | |||
87 | 91 | ||
88 | static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config); | 92 | static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config); |
89 | 93 | ||
90 | static ssize_t dma_show_mode(struct sys_device *dev, char *buf) | 94 | static ssize_t dma_show_mode(struct sys_device *dev, |
95 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 96 | { |
92 | struct dma_channel *channel = to_dma_channel(dev); | 97 | struct dma_channel *channel = to_dma_channel(dev); |
93 | return sprintf(buf, "0x%08x\n", channel->mode); | 98 | return sprintf(buf, "0x%08x\n", channel->mode); |
94 | } | 99 | } |
95 | 100 | ||
96 | static ssize_t dma_store_mode(struct sys_device *dev, | 101 | static ssize_t dma_store_mode(struct sys_device *dev, |
102 | struct sysdev_attribute *attr, | ||
97 | const char *buf, size_t count) | 103 | const char *buf, size_t count) |
98 | { | 104 | { |
99 | struct dma_channel *channel = to_dma_channel(dev); | 105 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -104,7 +110,8 @@ static ssize_t dma_store_mode(struct sys_device *dev, | |||
104 | static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode); | 110 | static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode); |
105 | 111 | ||
106 | #define dma_ro_attr(field, fmt) \ | 112 | #define dma_ro_attr(field, fmt) \ |
107 | static ssize_t dma_show_##field(struct sys_device *dev, char *buf) \ | 113 | static ssize_t dma_show_##field(struct sys_device *dev, \ |
114 | struct sysdev_attribute *attr, char *buf)\ | ||
108 | { \ | 115 | { \ |
109 | struct dma_channel *channel = to_dma_channel(dev); \ | 116 | struct dma_channel *channel = to_dma_channel(dev); \ |
110 | return sprintf(buf, fmt, channel->field); \ | 117 | return sprintf(buf, fmt, channel->field); \ |
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c index e885034a6b73..84e5ce146713 100644 --- a/arch/sparc64/kernel/sysfs.c +++ b/arch/sparc64/kernel/sysfs.c | |||
@@ -14,7 +14,8 @@ | |||
14 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); | 14 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); |
15 | 15 | ||
16 | #define SHOW_MMUSTAT_ULONG(NAME) \ | 16 | #define SHOW_MMUSTAT_ULONG(NAME) \ |
17 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 17 | static ssize_t show_##NAME(struct sys_device *dev, \ |
18 | struct sysdev_attribute *attr, char *buf) \ | ||
18 | { \ | 19 | { \ |
19 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ | 20 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ |
20 | return sprintf(buf, "%lu\n", p->NAME); \ | 21 | return sprintf(buf, "%lu\n", p->NAME); \ |
@@ -135,13 +136,16 @@ static unsigned long write_mmustat_enable(unsigned long val) | |||
135 | return sun4v_mmustat_conf(ra, &orig_ra); | 136 | return sun4v_mmustat_conf(ra, &orig_ra); |
136 | } | 137 | } |
137 | 138 | ||
138 | static ssize_t show_mmustat_enable(struct sys_device *s, char *buf) | 139 | static ssize_t show_mmustat_enable(struct sys_device *s, |
140 | struct sysdev_attribute *attr, char *buf) | ||
139 | { | 141 | { |
140 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); | 142 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); |
141 | return sprintf(buf, "%lx\n", val); | 143 | return sprintf(buf, "%lx\n", val); |
142 | } | 144 | } |
143 | 145 | ||
144 | static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count) | 146 | static ssize_t store_mmustat_enable(struct sys_device *s, |
147 | struct sysdev_attribute *attr, const char *buf, | ||
148 | size_t count) | ||
145 | { | 149 | { |
146 | unsigned long val, err; | 150 | unsigned long val, err; |
147 | int ret = sscanf(buf, "%ld", &val); | 151 | int ret = sscanf(buf, "%ld", &val); |
@@ -179,14 +183,16 @@ static void unregister_mmu_stats(struct sys_device *s) | |||
179 | #endif | 183 | #endif |
180 | 184 | ||
181 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ | 185 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ |
182 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 186 | static ssize_t show_##NAME(struct sys_device *dev, \ |
187 | struct sysdev_attribute *attr, char *buf) \ | ||
183 | { \ | 188 | { \ |
184 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 189 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
185 | return sprintf(buf, "%lu\n", c->MEMBER); \ | 190 | return sprintf(buf, "%lu\n", c->MEMBER); \ |
186 | } | 191 | } |
187 | 192 | ||
188 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ | 193 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ |
189 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 194 | static ssize_t show_##NAME(struct sys_device *dev, \ |
195 | struct sysdev_attribute *attr, char *buf) \ | ||
190 | { \ | 196 | { \ |
191 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 197 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
192 | return sprintf(buf, "%u\n", c->MEMBER); \ | 198 | return sprintf(buf, "%u\n", c->MEMBER); \ |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index c4a7ec31394c..e6a4d5f67643 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -762,10 +762,14 @@ DEFINE_PER_CPU(struct sys_device, device_mce); | |||
762 | 762 | ||
763 | /* Why are there no generic functions for this? */ | 763 | /* Why are there no generic functions for this? */ |
764 | #define ACCESSOR(name, var, start) \ | 764 | #define ACCESSOR(name, var, start) \ |
765 | static ssize_t show_ ## name(struct sys_device *s, char *buf) { \ | 765 | static ssize_t show_ ## name(struct sys_device *s, \ |
766 | struct sysdev_attribute *attr, \ | ||
767 | char *buf) { \ | ||
766 | return sprintf(buf, "%lx\n", (unsigned long)var); \ | 768 | return sprintf(buf, "%lx\n", (unsigned long)var); \ |
767 | } \ | 769 | } \ |
768 | static ssize_t set_ ## name(struct sys_device *s,const char *buf,size_t siz) { \ | 770 | static ssize_t set_ ## name(struct sys_device *s, \ |
771 | struct sysdev_attribute *attr, \ | ||
772 | const char *buf, size_t siz) { \ | ||
769 | char *end; \ | 773 | char *end; \ |
770 | unsigned long new = simple_strtoul(buf, &end, 0); \ | 774 | unsigned long new = simple_strtoul(buf, &end, 0); \ |
771 | if (end == buf) return -EINVAL; \ | 775 | if (end == buf) return -EINVAL; \ |
@@ -786,14 +790,16 @@ ACCESSOR(bank3ctl,bank[3],mce_restart()) | |||
786 | ACCESSOR(bank4ctl,bank[4],mce_restart()) | 790 | ACCESSOR(bank4ctl,bank[4],mce_restart()) |
787 | ACCESSOR(bank5ctl,bank[5],mce_restart()) | 791 | ACCESSOR(bank5ctl,bank[5],mce_restart()) |
788 | 792 | ||
789 | static ssize_t show_trigger(struct sys_device *s, char *buf) | 793 | static ssize_t show_trigger(struct sys_device *s, struct sysdev_attribute *attr, |
794 | char *buf) | ||
790 | { | 795 | { |
791 | strcpy(buf, trigger); | 796 | strcpy(buf, trigger); |
792 | strcat(buf, "\n"); | 797 | strcat(buf, "\n"); |
793 | return strlen(trigger) + 1; | 798 | return strlen(trigger) + 1; |
794 | } | 799 | } |
795 | 800 | ||
796 | static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz) | 801 | static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, |
802 | const char *buf,size_t siz) | ||
797 | { | 803 | { |
798 | char *p; | 804 | char *p; |
799 | int len; | 805 | int len; |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 1f4cc48c14c6..d5ae2243f0b9 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
@@ -35,6 +35,7 @@ atomic_t therm_throt_en = ATOMIC_INIT(0); | |||
35 | 35 | ||
36 | #define define_therm_throt_sysdev_show_func(name) \ | 36 | #define define_therm_throt_sysdev_show_func(name) \ |
37 | static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ | 37 | static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ |
38 | struct sysdev_attribute *attr, \ | ||
38 | char *buf) \ | 39 | char *buf) \ |
39 | { \ | 40 | { \ |
40 | unsigned int cpu = dev->id; \ | 41 | unsigned int cpu = dev->id; \ |
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 56b933119a04..fc4790638b69 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
@@ -644,7 +644,9 @@ static void microcode_fini_cpu(int cpu) | |||
644 | mutex_unlock(µcode_mutex); | 644 | mutex_unlock(µcode_mutex); |
645 | } | 645 | } |
646 | 646 | ||
647 | static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) | 647 | static ssize_t reload_store(struct sys_device *dev, |
648 | struct sysdev_attribute *attr, | ||
649 | const char *buf, size_t sz) | ||
648 | { | 650 | { |
649 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 651 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
650 | char *end; | 652 | char *end; |
@@ -674,14 +676,16 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) | |||
674 | return sz; | 676 | return sz; |
675 | } | 677 | } |
676 | 678 | ||
677 | static ssize_t version_show(struct sys_device *dev, char *buf) | 679 | static ssize_t version_show(struct sys_device *dev, |
680 | struct sysdev_attribute *attr, char *buf) | ||
678 | { | 681 | { |
679 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 682 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
680 | 683 | ||
681 | return sprintf(buf, "0x%x\n", uci->rev); | 684 | return sprintf(buf, "0x%x\n", uci->rev); |
682 | } | 685 | } |
683 | 686 | ||
684 | static ssize_t pf_show(struct sys_device *dev, char *buf) | 687 | static ssize_t pf_show(struct sys_device *dev, |
688 | struct sysdev_attribute *attr, char *buf) | ||
685 | { | 689 | { |
686 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 690 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
687 | 691 | ||