diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 43 | ||||
-rw-r--r-- | arch/m68k/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 2 |
3 files changed, 45 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 9b26fa5edad6..f99112d50b41 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/gpio_keys.h> | ||
25 | #include <linux/input.h> | ||
24 | 26 | ||
25 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
26 | #include <asm/memory.h> | 28 | #include <asm/memory.h> |
@@ -246,6 +248,46 @@ static struct platform_device tosakbd_device = { | |||
246 | .id = -1, | 248 | .id = -1, |
247 | }; | 249 | }; |
248 | 250 | ||
251 | static struct gpio_keys_button tosa_gpio_keys[] = { | ||
252 | { | ||
253 | .type = EV_PWR, | ||
254 | .code = KEY_SUSPEND, | ||
255 | .gpio = TOSA_GPIO_ON_KEY, | ||
256 | .desc = "On key", | ||
257 | .wakeup = 1, | ||
258 | .active_low = 1, | ||
259 | }, | ||
260 | { | ||
261 | .type = EV_KEY, | ||
262 | .code = TOSA_KEY_RECORD, | ||
263 | .gpio = TOSA_GPIO_RECORD_BTN, | ||
264 | .desc = "Record Button", | ||
265 | .wakeup = 1, | ||
266 | .active_low = 1, | ||
267 | }, | ||
268 | { | ||
269 | .type = EV_KEY, | ||
270 | .code = TOSA_KEY_SYNC, | ||
271 | .gpio = TOSA_GPIO_SYNC, | ||
272 | .desc = "Sync Button", | ||
273 | .wakeup = 1, | ||
274 | .active_low = 1, | ||
275 | }, | ||
276 | }; | ||
277 | |||
278 | static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = { | ||
279 | .buttons = tosa_gpio_keys, | ||
280 | .nbuttons = ARRAY_SIZE(tosa_gpio_keys), | ||
281 | }; | ||
282 | |||
283 | static struct platform_device tosa_gpio_keys_device = { | ||
284 | .name = "gpio-keys", | ||
285 | .id = -1, | ||
286 | .dev = { | ||
287 | .platform_data = &tosa_gpio_keys_platform_data, | ||
288 | }, | ||
289 | }; | ||
290 | |||
249 | /* | 291 | /* |
250 | * Tosa LEDs | 292 | * Tosa LEDs |
251 | */ | 293 | */ |
@@ -258,6 +300,7 @@ static struct platform_device *devices[] __initdata = { | |||
258 | &tosascoop_device, | 300 | &tosascoop_device, |
259 | &tosascoop_jc_device, | 301 | &tosascoop_jc_device, |
260 | &tosakbd_device, | 302 | &tosakbd_device, |
303 | &tosa_gpio_keys_device, | ||
261 | &tosaled_device, | 304 | &tosaled_device, |
262 | }; | 305 | }; |
263 | 306 | ||
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 3ee918695215..f85b928ffac4 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -335,7 +335,7 @@ void dump_thread(struct pt_regs * regs, struct user * dump) | |||
335 | if (dump->start_stack < TASK_SIZE) | 335 | if (dump->start_stack < TASK_SIZE) |
336 | dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT; | 336 | dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT; |
337 | 337 | ||
338 | dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump); | 338 | dump->u_ar0 = offsetof(struct user, regs); |
339 | sw = ((struct switch_stack *)regs) - 1; | 339 | sw = ((struct switch_stack *)regs) - 1; |
340 | dump->regs.d1 = regs->d1; | 340 | dump->regs.d1 = regs->d1; |
341 | dump->regs.d2 = regs->d2; | 341 | dump->regs.d2 = regs->d2; |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index e6e49289f788..4b749c416464 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -313,7 +313,7 @@ int main(void) | |||
313 | DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); | 313 | DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); |
314 | DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); | 314 | DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); |
315 | DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); | 315 | DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); |
316 | DEFINE(CLOCK_REALTIME_RES, (KTIME_MONOTONIC_RES).tv64); | 316 | DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); |
317 | 317 | ||
318 | #ifdef CONFIG_BUG | 318 | #ifdef CONFIG_BUG |
319 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); | 319 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); |