git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i2400m/SDIO: header for the SDIO subdriver
[safe/jmp/linux-2.6]
/
drivers
/
char
/
snsc_event.c
diff --git
a/drivers/char/snsc_event.c
b/drivers/char/snsc_event.c
index
864854c
..
55a9589
100644
(file)
--- a/
drivers/char/snsc_event.c
+++ b/
drivers/char/snsc_event.c
@@
-17,7
+17,7
@@
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
-#include <
linux/byteorder/generic
.h>
+#include <
asm/byteorder
.h>
#include <asm/sn/sn_sal.h>
#include <asm/unaligned.h>
#include "snsc.h"
#include <asm/sn/sn_sal.h>
#include <asm/unaligned.h>
#include "snsc.h"
@@
-36,7
+36,7
@@
DECLARE_TASKLET(sn_sysctl_event, scdrv_event, 0);
* destination.
*/
static irqreturn_t
* destination.
*/
static irqreturn_t
-scdrv_event_interrupt(int irq, void *subch_data
, struct pt_regs *regs
)
+scdrv_event_interrupt(int irq, void *subch_data)
{
struct subch_data_s *sd = subch_data;
unsigned long flags;
{
struct subch_data_s *sd = subch_data;
unsigned long flags;
@@
-63,16
+63,13
@@
static int
scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
{
char *desc_end;
scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
{
char *desc_end;
- __be32 from_buf;
/* record event source address */
/* record event source address */
- from_buf = get_unaligned((__be32 *)event);
- *src = be32_to_cpup(&from_buf);
+ *src = get_unaligned_be32(event);
event += 4; /* move on to event code */
/* record the system controller's event code */
event += 4; /* move on to event code */
/* record the system controller's event code */
- from_buf = get_unaligned((__be32 *)event);
- *code = be32_to_cpup(&from_buf);
+ *code = get_unaligned_be32(event);
event += 4; /* move on to event arguments */
/* how many arguments are in the packet? */
event += 4; /* move on to event arguments */
/* how many arguments are in the packet? */
@@
-86,8
+83,7
@@
scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
/* not an integer argument, so give up */
return -1;
}
/* not an integer argument, so give up */
return -1;
}
- from_buf = get_unaligned((__be32 *)event);
- *esp_code = be32_to_cpup(&from_buf);
+ *esp_code = get_unaligned_be32(event);
event += 4;
/* parse out the event description */
event += 4;
/* parse out the event description */
@@
-203,8
+199,6
@@
scdrv_dispatch_event(char *event, int len)
class = (code & EV_CLASS_MASK);
if (class == EV_CLASS_PWRD_NOTIFY || code == ENV_PWRDN_PEND) {
class = (code & EV_CLASS_MASK);
if (class == EV_CLASS_PWRD_NOTIFY || code == ENV_PWRDN_PEND) {
- struct task_struct *p;
-
if (snsc_shutting_down)
return;
if (snsc_shutting_down)
return;
@@
-277,7
+271,7
@@
scdrv_event_init(struct sysctl_data_s *scd)
event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info"
event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info"
- " for event monitoring\n", __
FUNCTION
__);
+ " for event monitoring\n", __
func
__);
return;
}
return;
}
@@
-291,7
+285,7
@@
scdrv_event_init(struct sysctl_data_s *scd)
if (event_sd->sd_subch < 0) {
kfree(event_sd);
printk(KERN_WARNING "%s: couldn't open event subchannel\n",
if (event_sd->sd_subch < 0) {
kfree(event_sd);
printk(KERN_WARNING "%s: couldn't open event subchannel\n",
- __
FUNCTION
__);
+ __
func
__);
return;
}
return;
}
@@
-301,7
+295,7
@@
scdrv_event_init(struct sysctl_data_s *scd)
"system controller events", event_sd);
if (rv) {
printk(KERN_WARNING "%s: irq request failed (%d)\n",
"system controller events", event_sd);
if (rv) {
printk(KERN_WARNING "%s: irq request failed (%d)\n",
- __
FUNCTION
__, rv);
+ __
func
__, rv);
ia64_sn_irtr_close(event_sd->sd_nasid, event_sd->sd_subch);
kfree(event_sd);
return;
ia64_sn_irtr_close(event_sd->sd_nasid, event_sd->sd_subch);
kfree(event_sd);
return;