1 |
commit: ad2bf1670e8e20a07183cf3e6b500e2aa54b9a0a |
2 |
Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 20:04:26 2018 +0000 |
4 |
Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 28 20:05:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ad2bf167 |
7 |
|
8 |
ia64 fix ptrace (restore from wrong commit) |
9 |
|
10 |
1700_ia64_fix_ptrace.patch | 460 --------------------------------------------- |
11 |
1 file changed, 460 deletions(-) |
12 |
|
13 |
diff --git a/1700_ia64_fix_ptrace.patch b/1700_ia64_fix_ptrace.patch |
14 |
deleted file mode 100644 |
15 |
index ad48a1a..0000000 |
16 |
--- a/1700_ia64_fix_ptrace.patch |
17 |
+++ /dev/null |
18 |
@@ -1,460 +0,0 @@ |
19 |
-diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c |
20 |
-index fc2dfc8..a7b1419 100644 |
21 |
---- a/drivers/platform/x86/dell-laptop.c |
22 |
-+++ b/drivers/platform/x86/dell-laptop.c |
23 |
-@@ -78,7 +78,6 @@ static struct platform_driver platform_driver = { |
24 |
- } |
25 |
- }; |
26 |
- |
27 |
--static struct calling_interface_buffer *buffer; |
28 |
- static struct platform_device *platform_device; |
29 |
- static struct backlight_device *dell_backlight_device; |
30 |
- static struct rfkill *wifi_rfkill; |
31 |
-@@ -322,7 +321,8 @@ static const struct dmi_system_id dell_quirks[] __initconst = { |
32 |
- { } |
33 |
- }; |
34 |
- |
35 |
--static void dell_set_arguments(u32 arg0, u32 arg1, u32 arg2, u32 arg3) |
36 |
-+static void dell_fill_request(struct calling_interface_buffer *buffer, |
37 |
-+ u32 arg0, u32 arg1, u32 arg2, u32 arg3) |
38 |
- { |
39 |
- memset(buffer, 0, sizeof(struct calling_interface_buffer)); |
40 |
- buffer->input[0] = arg0; |
41 |
-@@ -331,7 +331,8 @@ static void dell_set_arguments(u32 arg0, u32 arg1, u32 arg2, u32 arg3) |
42 |
- buffer->input[3] = arg3; |
43 |
- } |
44 |
- |
45 |
--static int dell_send_request(u16 class, u16 select) |
46 |
-+static int dell_send_request(struct calling_interface_buffer *buffer, |
47 |
-+ u16 class, u16 select) |
48 |
- { |
49 |
- int ret; |
50 |
- |
51 |
-@@ -468,21 +469,22 @@ static int dell_rfkill_set(void *data, bool blocked) |
52 |
- int disable = blocked ? 1 : 0; |
53 |
- unsigned long radio = (unsigned long)data; |
54 |
- int hwswitch_bit = (unsigned long)data - 1; |
55 |
-+ struct calling_interface_buffer buffer; |
56 |
- int hwswitch; |
57 |
- int status; |
58 |
- int ret; |
59 |
- |
60 |
-- dell_set_arguments(0, 0, 0, 0); |
61 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
62 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
63 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
64 |
- if (ret) |
65 |
- return ret; |
66 |
-- status = buffer->output[1]; |
67 |
-+ status = buffer.output[1]; |
68 |
- |
69 |
-- dell_set_arguments(0x2, 0, 0, 0); |
70 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
71 |
-+ dell_fill_request(&buffer, 0x2, 0, 0, 0); |
72 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
73 |
- if (ret) |
74 |
- return ret; |
75 |
-- hwswitch = buffer->output[1]; |
76 |
-+ hwswitch = buffer.output[1]; |
77 |
- |
78 |
- /* If the hardware switch controls this radio, and the hardware |
79 |
- switch is disabled, always disable the radio */ |
80 |
-@@ -490,8 +492,8 @@ static int dell_rfkill_set(void *data, bool blocked) |
81 |
- (status & BIT(0)) && !(status & BIT(16))) |
82 |
- disable = 1; |
83 |
- |
84 |
-- dell_set_arguments(1 | (radio<<8) | (disable << 16), 0, 0, 0); |
85 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
86 |
-+ dell_fill_request(&buffer, 1 | (radio<<8) | (disable << 16), 0, 0, 0); |
87 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
88 |
- return ret; |
89 |
- } |
90 |
- |
91 |
-@@ -500,9 +502,11 @@ static void dell_rfkill_update_sw_state(struct rfkill *rfkill, int radio, |
92 |
- { |
93 |
- if (status & BIT(0)) { |
94 |
- /* Has hw-switch, sync sw_state to BIOS */ |
95 |
-+ struct calling_interface_buffer buffer; |
96 |
- int block = rfkill_blocked(rfkill); |
97 |
-- dell_set_arguments(1 | (radio << 8) | (block << 16), 0, 0, 0); |
98 |
-- dell_send_request(CLASS_INFO, SELECT_RFKILL); |
99 |
-+ dell_fill_request(&buffer, |
100 |
-+ 1 | (radio << 8) | (block << 16), 0, 0, 0); |
101 |
-+ dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
102 |
- } else { |
103 |
- /* No hw-switch, sync BIOS state to sw_state */ |
104 |
- rfkill_set_sw_state(rfkill, !!(status & BIT(radio + 16))); |
105 |
-@@ -519,21 +523,22 @@ static void dell_rfkill_update_hw_state(struct rfkill *rfkill, int radio, |
106 |
- static void dell_rfkill_query(struct rfkill *rfkill, void *data) |
107 |
- { |
108 |
- int radio = ((unsigned long)data & 0xF); |
109 |
-+ struct calling_interface_buffer buffer; |
110 |
- int hwswitch; |
111 |
- int status; |
112 |
- int ret; |
113 |
- |
114 |
-- dell_set_arguments(0, 0, 0, 0); |
115 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
116 |
-- status = buffer->output[1]; |
117 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
118 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
119 |
-+ status = buffer.output[1]; |
120 |
- |
121 |
- if (ret != 0 || !(status & BIT(0))) { |
122 |
- return; |
123 |
- } |
124 |
- |
125 |
-- dell_set_arguments(0, 0x2, 0, 0); |
126 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
127 |
-- hwswitch = buffer->output[1]; |
128 |
-+ dell_fill_request(&buffer, 0, 0x2, 0, 0); |
129 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
130 |
-+ hwswitch = buffer.output[1]; |
131 |
- |
132 |
- if (ret != 0) |
133 |
- return; |
134 |
-@@ -550,22 +555,23 @@ static struct dentry *dell_laptop_dir; |
135 |
- |
136 |
- static int dell_debugfs_show(struct seq_file *s, void *data) |
137 |
- { |
138 |
-+ struct calling_interface_buffer buffer; |
139 |
- int hwswitch_state; |
140 |
- int hwswitch_ret; |
141 |
- int status; |
142 |
- int ret; |
143 |
- |
144 |
-- dell_set_arguments(0, 0, 0, 0); |
145 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
146 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
147 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
148 |
- if (ret) |
149 |
- return ret; |
150 |
-- status = buffer->output[1]; |
151 |
-+ status = buffer.output[1]; |
152 |
- |
153 |
-- dell_set_arguments(0, 0x2, 0, 0); |
154 |
-- hwswitch_ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
155 |
-+ dell_fill_request(&buffer, 0, 0x2, 0, 0); |
156 |
-+ hwswitch_ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
157 |
- if (hwswitch_ret) |
158 |
- return hwswitch_ret; |
159 |
-- hwswitch_state = buffer->output[1]; |
160 |
-+ hwswitch_state = buffer.output[1]; |
161 |
- |
162 |
- seq_printf(s, "return:\t%d\n", ret); |
163 |
- seq_printf(s, "status:\t0x%X\n", status); |
164 |
-@@ -646,22 +652,23 @@ static const struct file_operations dell_debugfs_fops = { |
165 |
- |
166 |
- static void dell_update_rfkill(struct work_struct *ignored) |
167 |
- { |
168 |
-+ struct calling_interface_buffer buffer; |
169 |
- int hwswitch = 0; |
170 |
- int status; |
171 |
- int ret; |
172 |
- |
173 |
-- dell_set_arguments(0, 0, 0, 0); |
174 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
175 |
-- status = buffer->output[1]; |
176 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
177 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
178 |
-+ status = buffer.output[1]; |
179 |
- |
180 |
- if (ret != 0) |
181 |
- return; |
182 |
- |
183 |
-- dell_set_arguments(0, 0x2, 0, 0); |
184 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
185 |
-+ dell_fill_request(&buffer, 0, 0x2, 0, 0); |
186 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
187 |
- |
188 |
- if (ret == 0 && (status & BIT(0))) |
189 |
-- hwswitch = buffer->output[1]; |
190 |
-+ hwswitch = buffer.output[1]; |
191 |
- |
192 |
- if (wifi_rfkill) { |
193 |
- dell_rfkill_update_hw_state(wifi_rfkill, 1, status, hwswitch); |
194 |
-@@ -719,6 +726,7 @@ static struct notifier_block dell_laptop_rbtn_notifier = { |
195 |
- |
196 |
- static int __init dell_setup_rfkill(void) |
197 |
- { |
198 |
-+ struct calling_interface_buffer buffer; |
199 |
- int status, ret, whitelisted; |
200 |
- const char *product; |
201 |
- |
202 |
-@@ -734,9 +742,9 @@ static int __init dell_setup_rfkill(void) |
203 |
- if (!force_rfkill && !whitelisted) |
204 |
- return 0; |
205 |
- |
206 |
-- dell_set_arguments(0, 0, 0, 0); |
207 |
-- ret = dell_send_request(CLASS_INFO, SELECT_RFKILL); |
208 |
-- status = buffer->output[1]; |
209 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
210 |
-+ ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); |
211 |
-+ status = buffer.output[1]; |
212 |
- |
213 |
- /* dell wireless info smbios call is not supported */ |
214 |
- if (ret != 0) |
215 |
-@@ -889,6 +897,7 @@ static void dell_cleanup_rfkill(void) |
216 |
- |
217 |
- static int dell_send_intensity(struct backlight_device *bd) |
218 |
- { |
219 |
-+ struct calling_interface_buffer buffer; |
220 |
- struct calling_interface_token *token; |
221 |
- int ret; |
222 |
- |
223 |
-@@ -896,17 +905,21 @@ static int dell_send_intensity(struct backlight_device *bd) |
224 |
- if (!token) |
225 |
- return -ENODEV; |
226 |
- |
227 |
-- dell_set_arguments(token->location, bd->props.brightness, 0, 0); |
228 |
-+ dell_fill_request(&buffer, |
229 |
-+ token->location, bd->props.brightness, 0, 0); |
230 |
- if (power_supply_is_system_supplied() > 0) |
231 |
-- ret = dell_send_request(CLASS_TOKEN_WRITE, SELECT_TOKEN_AC); |
232 |
-+ ret = dell_send_request(&buffer, |
233 |
-+ CLASS_TOKEN_WRITE, SELECT_TOKEN_AC); |
234 |
- else |
235 |
-- ret = dell_send_request(CLASS_TOKEN_WRITE, SELECT_TOKEN_BAT); |
236 |
-+ ret = dell_send_request(&buffer, |
237 |
-+ CLASS_TOKEN_WRITE, SELECT_TOKEN_BAT); |
238 |
- |
239 |
- return ret; |
240 |
- } |
241 |
- |
242 |
- static int dell_get_intensity(struct backlight_device *bd) |
243 |
- { |
244 |
-+ struct calling_interface_buffer buffer; |
245 |
- struct calling_interface_token *token; |
246 |
- int ret; |
247 |
- |
248 |
-@@ -914,14 +927,17 @@ static int dell_get_intensity(struct backlight_device *bd) |
249 |
- if (!token) |
250 |
- return -ENODEV; |
251 |
- |
252 |
-- dell_set_arguments(token->location, 0, 0, 0); |
253 |
-+ dell_fill_request(&buffer, token->location, 0, 0, 0); |
254 |
- if (power_supply_is_system_supplied() > 0) |
255 |
-- ret = dell_send_request(CLASS_TOKEN_READ, SELECT_TOKEN_AC); |
256 |
-+ ret = dell_send_request(&buffer, |
257 |
-+ CLASS_TOKEN_READ, SELECT_TOKEN_AC); |
258 |
- else |
259 |
-- ret = dell_send_request(CLASS_TOKEN_READ, SELECT_TOKEN_BAT); |
260 |
-+ ret = dell_send_request(&buffer, |
261 |
-+ CLASS_TOKEN_READ, SELECT_TOKEN_BAT); |
262 |
- |
263 |
- if (ret == 0) |
264 |
-- ret = buffer->output[1]; |
265 |
-+ ret = buffer.output[1]; |
266 |
-+ |
267 |
- return ret; |
268 |
- } |
269 |
- |
270 |
-@@ -1186,31 +1202,33 @@ static enum led_brightness kbd_led_level; |
271 |
- |
272 |
- static int kbd_get_info(struct kbd_info *info) |
273 |
- { |
274 |
-+ struct calling_interface_buffer buffer; |
275 |
- u8 units; |
276 |
- int ret; |
277 |
- |
278 |
-- dell_set_arguments(0, 0, 0, 0); |
279 |
-- ret = dell_send_request(CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
280 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
281 |
-+ ret = dell_send_request(&buffer, |
282 |
-+ CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
283 |
- if (ret) |
284 |
- return ret; |
285 |
- |
286 |
-- info->modes = buffer->output[1] & 0xFFFF; |
287 |
-- info->type = (buffer->output[1] >> 24) & 0xFF; |
288 |
-- info->triggers = buffer->output[2] & 0xFF; |
289 |
-- units = (buffer->output[2] >> 8) & 0xFF; |
290 |
-- info->levels = (buffer->output[2] >> 16) & 0xFF; |
291 |
-+ info->modes = buffer.output[1] & 0xFFFF; |
292 |
-+ info->type = (buffer.output[1] >> 24) & 0xFF; |
293 |
-+ info->triggers = buffer.output[2] & 0xFF; |
294 |
-+ units = (buffer.output[2] >> 8) & 0xFF; |
295 |
-+ info->levels = (buffer.output[2] >> 16) & 0xFF; |
296 |
- |
297 |
- if (quirks && quirks->kbd_led_levels_off_1 && info->levels) |
298 |
- info->levels--; |
299 |
- |
300 |
- if (units & BIT(0)) |
301 |
-- info->seconds = (buffer->output[3] >> 0) & 0xFF; |
302 |
-+ info->seconds = (buffer.output[3] >> 0) & 0xFF; |
303 |
- if (units & BIT(1)) |
304 |
-- info->minutes = (buffer->output[3] >> 8) & 0xFF; |
305 |
-+ info->minutes = (buffer.output[3] >> 8) & 0xFF; |
306 |
- if (units & BIT(2)) |
307 |
-- info->hours = (buffer->output[3] >> 16) & 0xFF; |
308 |
-+ info->hours = (buffer.output[3] >> 16) & 0xFF; |
309 |
- if (units & BIT(3)) |
310 |
-- info->days = (buffer->output[3] >> 24) & 0xFF; |
311 |
-+ info->days = (buffer.output[3] >> 24) & 0xFF; |
312 |
- |
313 |
- return ret; |
314 |
- } |
315 |
-@@ -1270,31 +1288,34 @@ static int kbd_set_level(struct kbd_state *state, u8 level) |
316 |
- |
317 |
- static int kbd_get_state(struct kbd_state *state) |
318 |
- { |
319 |
-+ struct calling_interface_buffer buffer; |
320 |
- int ret; |
321 |
- |
322 |
-- dell_set_arguments(0x1, 0, 0, 0); |
323 |
-- ret = dell_send_request(CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
324 |
-+ dell_fill_request(&buffer, 0, 0, 0, 0); |
325 |
-+ ret = dell_send_request(&buffer, |
326 |
-+ CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
327 |
- if (ret) |
328 |
- return ret; |
329 |
- |
330 |
-- state->mode_bit = ffs(buffer->output[1] & 0xFFFF); |
331 |
-+ state->mode_bit = ffs(buffer.output[1] & 0xFFFF); |
332 |
- if (state->mode_bit != 0) |
333 |
- state->mode_bit--; |
334 |
- |
335 |
-- state->triggers = (buffer->output[1] >> 16) & 0xFF; |
336 |
-- state->timeout_value = (buffer->output[1] >> 24) & 0x3F; |
337 |
-- state->timeout_unit = (buffer->output[1] >> 30) & 0x3; |
338 |
-- state->als_setting = buffer->output[2] & 0xFF; |
339 |
-- state->als_value = (buffer->output[2] >> 8) & 0xFF; |
340 |
-- state->level = (buffer->output[2] >> 16) & 0xFF; |
341 |
-- state->timeout_value_ac = (buffer->output[2] >> 24) & 0x3F; |
342 |
-- state->timeout_unit_ac = (buffer->output[2] >> 30) & 0x3; |
343 |
-+ state->triggers = (buffer.output[1] >> 16) & 0xFF; |
344 |
-+ state->timeout_value = (buffer.output[1] >> 24) & 0x3F; |
345 |
-+ state->timeout_unit = (buffer.output[1] >> 30) & 0x3; |
346 |
-+ state->als_setting = buffer.output[2] & 0xFF; |
347 |
-+ state->als_value = (buffer.output[2] >> 8) & 0xFF; |
348 |
-+ state->level = (buffer.output[2] >> 16) & 0xFF; |
349 |
-+ state->timeout_value_ac = (buffer.output[2] >> 24) & 0x3F; |
350 |
-+ state->timeout_unit_ac = (buffer.output[2] >> 30) & 0x3; |
351 |
- |
352 |
- return ret; |
353 |
- } |
354 |
- |
355 |
- static int kbd_set_state(struct kbd_state *state) |
356 |
- { |
357 |
-+ struct calling_interface_buffer buffer; |
358 |
- int ret; |
359 |
- u32 input1; |
360 |
- u32 input2; |
361 |
-@@ -1307,8 +1328,9 @@ static int kbd_set_state(struct kbd_state *state) |
362 |
- input2 |= (state->level & 0xFF) << 16; |
363 |
- input2 |= (state->timeout_value_ac & 0x3F) << 24; |
364 |
- input2 |= (state->timeout_unit_ac & 0x3) << 30; |
365 |
-- dell_set_arguments(0x2, input1, input2, 0); |
366 |
-- ret = dell_send_request(CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
367 |
-+ dell_fill_request(&buffer, 0x2, input1, input2, 0); |
368 |
-+ ret = dell_send_request(&buffer, |
369 |
-+ CLASS_KBD_BACKLIGHT, SELECT_KBD_BACKLIGHT); |
370 |
- |
371 |
- return ret; |
372 |
- } |
373 |
-@@ -1335,6 +1357,7 @@ static int kbd_set_state_safe(struct kbd_state *state, struct kbd_state *old) |
374 |
- |
375 |
- static int kbd_set_token_bit(u8 bit) |
376 |
- { |
377 |
-+ struct calling_interface_buffer buffer; |
378 |
- struct calling_interface_token *token; |
379 |
- int ret; |
380 |
- |
381 |
-@@ -1345,14 +1368,15 @@ static int kbd_set_token_bit(u8 bit) |
382 |
- if (!token) |
383 |
- return -EINVAL; |
384 |
- |
385 |
-- dell_set_arguments(token->location, token->value, 0, 0); |
386 |
-- ret = dell_send_request(CLASS_TOKEN_WRITE, SELECT_TOKEN_STD); |
387 |
-+ dell_fill_request(&buffer, token->location, token->value, 0, 0); |
388 |
-+ ret = dell_send_request(&buffer, CLASS_TOKEN_WRITE, SELECT_TOKEN_STD); |
389 |
- |
390 |
- return ret; |
391 |
- } |
392 |
- |
393 |
- static int kbd_get_token_bit(u8 bit) |
394 |
- { |
395 |
-+ struct calling_interface_buffer buffer; |
396 |
- struct calling_interface_token *token; |
397 |
- int ret; |
398 |
- int val; |
399 |
-@@ -1364,9 +1388,9 @@ static int kbd_get_token_bit(u8 bit) |
400 |
- if (!token) |
401 |
- return -EINVAL; |
402 |
- |
403 |
-- dell_set_arguments(token->location, 0, 0, 0); |
404 |
-- ret = dell_send_request(CLASS_TOKEN_READ, SELECT_TOKEN_STD); |
405 |
-- val = buffer->output[1]; |
406 |
-+ dell_fill_request(&buffer, token->location, 0, 0, 0); |
407 |
-+ ret = dell_send_request(&buffer, CLASS_TOKEN_READ, SELECT_TOKEN_STD); |
408 |
-+ val = buffer.output[1]; |
409 |
- |
410 |
- if (ret) |
411 |
- return ret; |
412 |
-@@ -2102,6 +2126,7 @@ static struct notifier_block dell_laptop_notifier = { |
413 |
- |
414 |
- int dell_micmute_led_set(int state) |
415 |
- { |
416 |
-+ struct calling_interface_buffer buffer; |
417 |
- struct calling_interface_token *token; |
418 |
- |
419 |
- if (state == 0) |
420 |
-@@ -2114,8 +2139,8 @@ int dell_micmute_led_set(int state) |
421 |
- if (!token) |
422 |
- return -ENODEV; |
423 |
- |
424 |
-- dell_set_arguments(token->location, token->value, 0, 0); |
425 |
-- dell_send_request(CLASS_TOKEN_WRITE, SELECT_TOKEN_STD); |
426 |
-+ dell_fill_request(&buffer, token->location, token->value, 0, 0); |
427 |
-+ dell_send_request(&buffer, CLASS_TOKEN_WRITE, SELECT_TOKEN_STD); |
428 |
- |
429 |
- return state; |
430 |
- } |
431 |
-@@ -2146,13 +2171,6 @@ static int __init dell_init(void) |
432 |
- if (ret) |
433 |
- goto fail_platform_device2; |
434 |
- |
435 |
-- buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); |
436 |
-- if (!buffer) { |
437 |
-- ret = -ENOMEM; |
438 |
-- goto fail_buffer; |
439 |
-- } |
440 |
-- |
441 |
-- |
442 |
- ret = dell_setup_rfkill(); |
443 |
- |
444 |
- if (ret) { |
445 |
-@@ -2177,10 +2195,13 @@ static int __init dell_init(void) |
446 |
- |
447 |
- token = dell_smbios_find_token(BRIGHTNESS_TOKEN); |
448 |
- if (token) { |
449 |
-- dell_set_arguments(token->location, 0, 0, 0); |
450 |
-- ret = dell_send_request(CLASS_TOKEN_READ, SELECT_TOKEN_AC); |
451 |
-+ struct calling_interface_buffer buffer; |
452 |
-+ |
453 |
-+ dell_fill_request(&buffer, token->location, 0, 0, 0); |
454 |
-+ ret = dell_send_request(&buffer, |
455 |
-+ CLASS_TOKEN_READ, SELECT_TOKEN_AC); |
456 |
- if (ret) |
457 |
-- max_intensity = buffer->output[3]; |
458 |
-+ max_intensity = buffer.output[3]; |
459 |
- } |
460 |
- |
461 |
- if (max_intensity) { |
462 |
-@@ -2214,8 +2235,6 @@ static int __init dell_init(void) |
463 |
- fail_get_brightness: |
464 |
- backlight_device_unregister(dell_backlight_device); |
465 |
- fail_backlight: |
466 |
-- kfree(buffer); |
467 |
--fail_buffer: |
468 |
- dell_cleanup_rfkill(); |
469 |
- fail_rfkill: |
470 |
- platform_device_del(platform_device); |
471 |
-@@ -2235,7 +2254,6 @@ static void __exit dell_exit(void) |
472 |
- touchpad_led_exit(); |
473 |
- kbd_led_exit(); |
474 |
- backlight_device_unregister(dell_backlight_device); |
475 |
-- kfree(buffer); |
476 |
- dell_cleanup_rfkill(); |
477 |
- if (platform_device) { |
478 |
- platform_device_unregister(platform_device); |