X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fvia-pmu68k.c;h=356c7216a1795e7b4eb183cda6a349e3efdff133;hb=517d5a0417e19101eaa769039d1921d626ee546c;hp=9f4eff1d1a0f672f0b3714b2ec2460ea177be3d1;hpb=c730f5b621afa33e9f4939da9078669162ebff4e;p=powerpc.git diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index 9f4eff1d1a..356c7216a1 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -96,10 +95,10 @@ static int data_index; static int data_len; static int adb_int_pending; static int pmu_adb_flags; -static int adb_dev_map = 0; +static int adb_dev_map; static struct adb_request bright_req_1, bright_req_2, bright_req_3; static int pmu_kind = PMU_UNKNOWN; -static int pmu_fully_inited = 0; +static int pmu_fully_inited; int asleep; BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); @@ -107,7 +106,7 @@ BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); 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); @@ -118,8 +117,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 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); @@ -222,7 +220,7 @@ pmu_init(void) } if (pmu_state == idle) { adb_int_pending = 1; - pmu_interrupt(0, NULL, NULL); + pmu_interrupt(0, NULL); } pmu_poll(); udelay(10); @@ -563,17 +561,17 @@ pmu_poll(void) 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; - pmu_interrupt(IRQ_MAC_ADB_CL, NULL, NULL); + pmu_interrupt(IRQ_MAC_ADB_CL, NULL); } 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 */ @@ -657,7 +655,7 @@ pmu_interrupt(int irq, void *dev_id, struct pt_regs *regs) } 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; @@ -701,7 +699,7 @@ pmu_done(struct adb_request *req) /* 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; @@ -726,7 +724,7 @@ pmu_handle_data(unsigned char *data, int len, struct pt_regs *regs) } 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) { @@ -848,7 +846,7 @@ pbook_pci_save(void) 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; @@ -1041,7 +1039,7 @@ static int pmu_ioctl(struct inode * inode, struct file *filp, return -EINVAL; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { .read = pmu_read, .write = pmu_write, .ioctl = pmu_ioctl,