From 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 5 Feb 2007 19:30:29 +0100 Subject: [POWERPC] windfarm: don't die on suspend thread signal When the windfarm thread gets a suspend signal it will die instead of freezing. This fixes it. Signed-off-by: Johannes Berg Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- drivers/macintosh/windfarm_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/macintosh') 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; } -- cgit v1.2.3 From 193d0732920fd09825501136f3a01e9c28a700e6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 9 Feb 2007 16:39:05 +0000 Subject: [PATCH] offsetof is size_t Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/macintosh/rack-meter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/macintosh') 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 */ -- cgit v1.2.3 From 45941d0481f538324fa21d6450116d13f6e51e91 Mon Sep 17 00:00:00 2001 From: Soeren Sonnenburg Date: Thu, 8 Feb 2007 14:20:38 -0800 Subject: [PATCH] enable mouse button 2+3 emulation for x86 macs As macbook/macbook pro's also have to live with a single mouse button the following patch just enables the Macintosh device drivers menu in Kconfig + adds the macintosh dir to the obj-* to make macbook* users happy (who use exactly that since months.... Signed-off-by: Soeren Sonnenburg Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Dmitry Torokhov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/macintosh/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/macintosh') 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" -- cgit v1.2.3 From b653d081c17e26101980c858a9808740533b78b4 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Sat, 10 Feb 2007 01:45:54 -0800 Subject: [PATCH] proc: remove useless (and buggy) ->nlink settings Bug: pnx8550 code creates directory but resets ->nlink to 1. create_proc_entry() et al will correctly set ->nlink for you. Signed-off-by: Alexey Dobriyan Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Jeff Dike Cc: Corey Minyard Cc: Alan Cox Cc: Kyle McMartin Cc: Martin Schwidefsky Cc: Greg KH Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/macintosh/via-pmu.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/macintosh') diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 8ca75e52f63..eb6653f69ce 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -516,7 +516,6 @@ static int __init via_pmu_dev_init(void) proc_get_irqstats, NULL); proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root); if (proc_pmu_options) { - proc_pmu_options->nlink = 1; proc_pmu_options->read_proc = proc_read_options; proc_pmu_options->write_proc = proc_write_options; } -- cgit v1.2.3 From fa027c2a0a0d6d1df6b29ee99048502c93da0dd4 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:33 -0800 Subject: [PATCH] mark struct file_operations const 4 Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@sdl.org: dvb fix] Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/macintosh/adb.c | 2 +- drivers/macintosh/ans-lcd.c | 2 +- drivers/macintosh/apm_emu.c | 2 +- drivers/macintosh/nvram.c | 2 +- drivers/macintosh/smu.c | 2 +- drivers/macintosh/via-pmu.c | 2 +- drivers/macintosh/via-pmu68k.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/macintosh') diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 7cec6de5e2b..f729eebf771 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -885,7 +885,7 @@ out: return ret; } -static struct file_operations adb_fops = { +static const struct file_operations adb_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = adb_read, diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index 2b8a6e821d4..cdd5a0f72e3 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c @@ -121,7 +121,7 @@ anslcd_open( struct inode * inode, struct file * file ) return 0; } -struct file_operations anslcd_fops = { +const struct file_operations anslcd_fops = { .write = anslcd_write, .ioctl = anslcd_ioctl, .open = anslcd_open, diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index 4300c628f8a..a6d50f4fabd 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -501,7 +501,7 @@ static int apm_emu_get_info(char *buf, char **start, off_t fpos, int length) return p - buf; } -static struct file_operations apm_bios_fops = { +static const struct file_operations apm_bios_fops = { .owner = THIS_MODULE, .read = do_read, .poll = do_poll, diff --git a/drivers/macintosh/nvram.c b/drivers/macintosh/nvram.c index 30791875fc9..b195d753d2e 100644 --- a/drivers/macintosh/nvram.c +++ b/drivers/macintosh/nvram.c @@ -100,7 +100,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file, return 0; } -struct file_operations nvram_fops = { +const struct file_operations nvram_fops = { .owner = THIS_MODULE, .llseek = nvram_llseek, .read = read_nvram, diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 6f30459b938..3096836d8bd 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -1277,7 +1277,7 @@ static int smu_release(struct inode *inode, struct file *file) } -static struct file_operations smu_device_fops = { +static const struct file_operations smu_device_fops = { .llseek = no_llseek, .read = smu_read, .write = smu_write, diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index eb6653f69ce..96bea4b62c4 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -2672,7 +2672,7 @@ pmu_ioctl(struct inode * inode, struct file *filp, return error; } -static struct file_operations pmu_device_fops = { +static const struct file_operations pmu_device_fops = { .read = pmu_read, .write = pmu_write, .poll = pmu_fpoll, diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index 93e6ef9233f..4f5b6fa196c 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -1040,7 +1040,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, -- cgit v1.2.3