diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/Kconfig | 2 | ||||
-rw-r--r-- | drivers/macintosh/adb.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/apm_emu.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu-backlight.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 1 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu68k.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_core.c | 6 |
9 files changed, 12 insertions, 13 deletions
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index a9e747c3979..1a86387e23b 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -1,6 +1,6 @@ menu "Macintosh device drivers" - depends on PPC || MAC + depends on PPC || MAC || X86 config ADB bool "Apple Desktop Bus (ADB) support" diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index d43ea81d6df..7cec6de5e2b 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -828,7 +828,7 @@ static ssize_t adb_write(struct file *file, const char __user *buf, if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; - req = (struct adb_request *) kmalloc(sizeof(struct adb_request), + req = kmalloc(sizeof(struct adb_request), GFP_KERNEL); if (req == NULL) return -ENOMEM; diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index 8862a83b8d8..4300c628f8a 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -321,7 +321,7 @@ static int do_open(struct inode * inode, struct file * filp) { struct apm_user * as; - as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); + as = kmalloc(sizeof(*as), GFP_KERNEL); if (as == NULL) { printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n", sizeof(*as)); diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 5ed41fe84e5..f83fad2a3ff 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -171,11 +171,11 @@ static void rackmeter_setup_dbdma(struct rackmeter *rm) /* Make sure dbdma is reset */ DBDMA_DO_RESET(rm->dma_regs); - pr_debug("rackmeter: mark offset=0x%lx\n", + pr_debug("rackmeter: mark offset=0x%zx\n", offsetof(struct rackmeter_dma, mark)); - pr_debug("rackmeter: buf1 offset=0x%lx\n", + pr_debug("rackmeter: buf1 offset=0x%zx\n", offsetof(struct rackmeter_dma, buf1)); - pr_debug("rackmeter: buf2 offset=0x%lx\n", + pr_debug("rackmeter: buf2 offset=0x%zx\n", offsetof(struct rackmeter_dma, buf2)); /* Prepare 4 dbdma commands for the 2 buffers */ diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 6dde27ab79a..6f30459b938 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -945,7 +945,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id) */ tlen = sizeof(struct property) + len + 18; - prop = kcalloc(tlen, 1, GFP_KERNEL); + prop = kzalloc(tlen, GFP_KERNEL); if (prop == NULL) return NULL; hdr = (struct smu_sdbp_header *)(prop + 1); diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c index 6c29fe727c0..801a974342f 100644 --- a/drivers/macintosh/via-pmu-backlight.c +++ b/drivers/macintosh/via-pmu-backlight.c @@ -147,7 +147,7 @@ void __init pmu_backlight_init() snprintf(name, sizeof(name), "pmubl"); - bd = backlight_device_register(name, NULL, &pmu_backlight_data); + bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data); if (IS_ERR(bd)) { printk("pmubl: Backlight registration failed\n"); goto error; diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index c8558d4ed50..8ca75e52f63 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -44,6 +44,7 @@ #include <linux/sysdev.h> #include <linux/freezer.h> #include <linux/syscalls.h> +#include <linux/suspend.h> #include <linux/cpu.h> #include <asm/prom.h> #include <asm/machdep.h> diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index d9986f3a3fb..93e6ef9233f 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -847,7 +847,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; diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index e947af982f9..94c117ef20c 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c @@ -94,8 +94,6 @@ static int wf_thread_func(void *data) DBG("wf: thread started\n"); while(!kthread_should_stop()) { - try_to_freeze(); - if (time_after_eq(jiffies, next)) { wf_notify(WF_EVENT_TICK, NULL); if (wf_overtemp) { @@ -118,8 +116,8 @@ static int wf_thread_func(void *data) if (delay <= HZ) schedule_timeout_interruptible(delay); - /* there should be no signal, but oh well */ - if (signal_pending(current)) { + /* there should be no non-suspend signal, but oh well */ + if (signal_pending(current) && !try_to_freeze()) { printk(KERN_WARNING "windfarm: thread got sigl !\n"); break; } |