git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
macintosh
/
via-pmu68k.c
diff --git
a/drivers/macintosh/via-pmu68k.c
b/drivers/macintosh/via-pmu68k.c
index
6fc1fba
..
93e6ef9
100644
(file)
--- a/
drivers/macintosh/via-pmu68k.c
+++ b/
drivers/macintosh/via-pmu68k.c
@@
-102,12
+102,12
@@
static int pmu_kind = PMU_UNKNOWN;
static int pmu_fully_inited = 0;
int asleep;
static int pmu_fully_inited = 0;
int asleep;
-
struct notifier_block *sleep_notifier_list
;
+
BLOCKING_NOTIFIER_HEAD(sleep_notifier_list)
;
static int pmu_probe(void);
static int pmu_init(void);
static void pmu_start(void);
static int pmu_probe(void);
static int pmu_init(void);
static void pmu_start(void);
-static irqreturn_t pmu_interrupt(int irq, void *arg
, struct pt_regs *regs
);
+static irqreturn_t pmu_interrupt(int irq, void *arg);
static int pmu_send_request(struct adb_request *req, int sync);
static int pmu_autopoll(int devs);
void pmu_poll(void);
static int pmu_send_request(struct adb_request *req, int sync);
static int pmu_autopoll(int devs);
void pmu_poll(void);
@@
-118,8
+118,7
@@
static void pmu_start(void);
static void send_byte(int x);
static void recv_byte(void);
static void pmu_done(struct adb_request *req);
static void send_byte(int x);
static void recv_byte(void);
static void pmu_done(struct adb_request *req);
-static void pmu_handle_data(unsigned char *data, int len,
- struct pt_regs *regs);
+static void pmu_handle_data(unsigned char *data, int len);
static void set_volume(int level);
static void pmu_enable_backlight(int on);
static void pmu_set_brightness(int level);
static void set_volume(int level);
static void pmu_enable_backlight(int on);
static void pmu_set_brightness(int level);
@@
-177,7
+176,7
@@
static s8 pmu_data_len[256][2] = {
/*f8*/ {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
};
/*f8*/ {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
};
-int pmu_probe()
+int pmu_probe(
void
)
{
if (macintosh_config->adb_type == MAC_ADB_PB1) {
pmu_kind = PMU_68K_V1;
{
if (macintosh_config->adb_type == MAC_ADB_PB1) {
pmu_kind = PMU_68K_V1;
@@
-222,7
+221,7
@@
pmu_init(void)
}
if (pmu_state == idle) {
adb_int_pending = 1;
}
if (pmu_state == idle) {
adb_int_pending = 1;
- pmu_interrupt(0, NULL
, NULL
);
+ pmu_interrupt(0, NULL);
}
pmu_poll();
udelay(10);
}
pmu_poll();
udelay(10);
@@
-493,7
+492,7
@@
pmu_queue_request(struct adb_request *req)
return -EINVAL;
}
return -EINVAL;
}
- req->next =
0
;
+ req->next =
NULL
;
req->sent = 0;
req->complete = 0;
local_irq_save(flags);
req->sent = 0;
req->complete = 0;
local_irq_save(flags);
@@
-521,7
+520,7
@@
send_byte(int x)
}
static void
}
static void
-recv_byte()
+recv_byte(
void
)
{
char c;
{
char c;
@@
-531,7
+530,7
@@
recv_byte()
}
static void
}
static void
-pmu_start()
+pmu_start(
void
)
{
unsigned long flags;
struct adb_request *req;
{
unsigned long flags;
struct adb_request *req;
@@
-556,24
+555,24
@@
out:
}
void
}
void
-pmu_poll()
+pmu_poll(
void
)
{
unsigned long flags;
local_irq_save(flags);
if (via1[IFR] & SR_INT) {
via1[IFR] = SR_INT;
{
unsigned long flags;
local_irq_save(flags);
if (via1[IFR] & SR_INT) {
via1[IFR] = SR_INT;
- pmu_interrupt(IRQ_MAC_ADB_SR, NULL
, NULL
);
+ pmu_interrupt(IRQ_MAC_ADB_SR, NULL);
}
if (via1[IFR] & CB1_INT) {
via1[IFR] = CB1_INT;
}
if (via1[IFR] & CB1_INT) {
via1[IFR] = CB1_INT;
- pmu_interrupt(IRQ_MAC_ADB_CL, NULL
, NULL
);
+ pmu_interrupt(IRQ_MAC_ADB_CL, NULL);
}
local_irq_restore(flags);
}
static irqreturn_t
}
local_irq_restore(flags);
}
static irqreturn_t
-pmu_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+pmu_interrupt(int irq, void *dev_id)
{
struct adb_request *req;
int timeout, bite = 0; /* to prevent compiler warning */
{
struct adb_request *req;
int timeout, bite = 0; /* to prevent compiler warning */
@@
-657,7
+656,7
@@
pmu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
if (pmu_state == reading_intr) {
}
if (pmu_state == reading_intr) {
- pmu_handle_data(interrupt_data, data_index
, regs
);
+ pmu_handle_data(interrupt_data, data_index);
} else {
req = current_req;
current_req = req->next;
} else {
req = current_req;
current_req = req->next;
@@
-701,7
+700,7
@@
pmu_done(struct adb_request *req)
/* Interrupt data could be the result data from an ADB cmd */
static void
/* Interrupt data could be the result data from an ADB cmd */
static void
-pmu_handle_data(unsigned char *data, int len
, struct pt_regs *regs
)
+pmu_handle_data(unsigned char *data, int len)
{
static int show_pmu_ints = 1;
{
static int show_pmu_ints = 1;
@@
-717,7
+716,7
@@
pmu_handle_data(unsigned char *data, int len, struct pt_regs *regs)
printk(KERN_ERR "PMU: extra ADB reply\n");
return;
}
printk(KERN_ERR "PMU: extra ADB reply\n");
return;
}
- req_awaiting_reply =
0
;
+ req_awaiting_reply =
NULL
;
if (len <= 2)
req->reply_len = 0;
else {
if (len <= 2)
req->reply_len = 0;
else {
@@
-726,7
+725,7
@@
pmu_handle_data(unsigned char *data, int len, struct pt_regs *regs)
}
pmu_done(req);
} else {
}
pmu_done(req);
} else {
- adb_input(data+1, len-1,
regs,
1);
+ adb_input(data+1, len-1, 1);
}
} else {
if (data[0] == 0x08 && len == 3) {
}
} else {
if (data[0] == 0x08 && len == 3) {
@@
-835,7
+834,7
@@
static struct pci_save {
} *pbook_pci_saves;
static int n_pbook_pci_saves;
} *pbook_pci_saves;
static int n_pbook_pci_saves;
-static inline void
__openfirmware
+static inline void
pbook_pci_save(void)
{
int npci;
pbook_pci_save(void)
{
int npci;
@@
-843,18
+842,18
@@
pbook_pci_save(void)
struct pci_save *ps;
npci = 0;
struct pci_save *ps;
npci = 0;
- while ((pd = pci_
find
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
+ while ((pd = pci_
get
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
++npci;
n_pbook_pci_saves = npci;
if (npci == 0)
return;
++npci;
n_pbook_pci_saves = npci;
if (npci == 0)
return;
- ps =
(struct pci_save *)
kmalloc(npci * sizeof(*ps), GFP_KERNEL);
+ ps = kmalloc(npci * sizeof(*ps), GFP_KERNEL);
pbook_pci_saves = ps;
if (ps == NULL)
return;
pd = NULL;
pbook_pci_saves = ps;
if (ps == NULL)
return;
pd = NULL;
- while ((pd = pci_
find
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+ while ((pd = pci_
get
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
pci_read_config_word(pd, PCI_COMMAND, &ps->command);
pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
pci_read_config_word(pd, PCI_COMMAND, &ps->command);
pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
@@
-863,7
+862,7
@@
pbook_pci_save(void)
}
}
}
}
-static inline void
__openfirmware
+static inline void
pbook_pci_restore(void)
{
u16 cmd;
pbook_pci_restore(void)
{
u16 cmd;
@@
-871,7
+870,7
@@
pbook_pci_restore(void)
struct pci_dev *pd = NULL;
int j;
struct pci_dev *pd = NULL;
int j;
- while ((pd = pci_
find
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+ while ((pd = pci_
get
_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
if (ps->command == 0)
continue;
pci_read_config_word(pd, PCI_COMMAND, &cmd);
if (ps->command == 0)
continue;
pci_read_config_word(pd, PCI_COMMAND, &cmd);
@@
-902,7
+901,7
@@
pbook_pci_restore(void)
#define IRQ_ENABLE ((unsigned int *)0xf3000024)
#define MEM_CTRL ((unsigned int *)0xf8000070)
#define IRQ_ENABLE ((unsigned int *)0xf3000024)
#define MEM_CTRL ((unsigned int *)0xf8000070)
-int
__openfirmware
powerbook_sleep(void)
+int powerbook_sleep(void)
{
int ret, i, x;
static int save_backlight;
{
int ret, i, x;
static int save_backlight;
@@
-913,7
+912,8
@@
int __openfirmware powerbook_sleep(void)
struct adb_request sleep_req;
/* Notify device drivers */
struct adb_request sleep_req;
/* Notify device drivers */
- ret = notifier_call_chain(&sleep_notifier_list, PBOOK_SLEEP, NULL);
+ ret = blocking_notifier_call_chain(&sleep_notifier_list,
+ PBOOK_SLEEP, NULL);
if (ret & NOTIFY_STOP_MASK)
return -EBUSY;
if (ret & NOTIFY_STOP_MASK)
return -EBUSY;
@@
-984,7
+984,7
@@
int __openfirmware powerbook_sleep(void)
enable_irq(i);
/* Notify drivers */
enable_irq(i);
/* Notify drivers */
- notifier_call_chain(&sleep_notifier_list, PBOOK_WAKE, NULL);
+
blocking_
notifier_call_chain(&sleep_notifier_list, PBOOK_WAKE, NULL);
/* reenable ADB autopoll */
pmu_adb_autopoll(adb_dev_map);
/* reenable ADB autopoll */
pmu_adb_autopoll(adb_dev_map);
@@
-1001,25
+1001,24
@@
int __openfirmware powerbook_sleep(void)
/*
* Support for /dev/pmu device
*/
/*
* Support for /dev/pmu device
*/
-static int
__openfirmware
pmu_open(struct inode *inode, struct file *file)
+static int pmu_open(struct inode *inode, struct file *file)
{
return 0;
}
{
return 0;
}
-static ssize_t
__openfirmware
pmu_read(struct file *file, char *buf,
+static ssize_t pmu_read(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
return 0;
}
size_t count, loff_t *ppos)
{
return 0;
}
-static ssize_t
__openfirmware
pmu_write(struct file *file, const char *buf,
+static ssize_t pmu_write(struct file *file, const char *buf,
size_t count, loff_t *ppos)
{
return 0;
}
size_t count, loff_t *ppos)
{
return 0;
}
-/* Note: removed __openfirmware here since it causes link errors */
-static int /*__openfirmware*/ pmu_ioctl(struct inode * inode, struct file *filp,
+static int pmu_ioctl(struct inode * inode, struct file *filp,
u_int cmd, u_long arg)
{
int error;
u_int cmd, u_long arg)
{
int error;