From 9d44f70543f1098001ea4347be49485aed6a7692 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 14 Jan 2008 17:26:58 -0800 Subject: [PATCH] ARM: OMAP1: Misc fixes based on RMK's comments Misc fixes based on RMK's comments for omap1-upstream series. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/board-palmte.c | 3 ++- arch/arm/mach-omap1/pm.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index ccd83cf0564..63c3131dbc6 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -342,7 +342,8 @@ static struct spi_board_info palmte_spi_info[] __initdata = { }, }; -static void palmte_headphones_detect(void *data, int state) { +static void palmte_headphones_detect(void *data, int state) +{ if (state) { /* Headphones connected, disable speaker */ omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 4da18b869d6..c9c6d96c0c1 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -659,7 +659,7 @@ static struct irqaction omap_wakeup_irq = { -static struct platform_suspend_ops omap_pm_ops ={ +static struct platform_suspend_ops omap_pm_ops = { .prepare = omap_pm_prepare, .enter = omap_pm_enter, .finish = omap_pm_finish, @@ -668,6 +668,11 @@ static struct platform_suspend_ops omap_pm_ops ={ static int __init omap_pm_init(void) { + +#ifdef CONFIG_OMAP_32K_TIMER + int error; +#endif + printk("Power Management for TI OMAP.\n"); /* @@ -719,8 +724,9 @@ static int __init omap_pm_init(void) #endif #ifdef CONFIG_OMAP_32K_TIMER - if (subsys_create_file(&power_subsys, &sleep_while_idle_attr)) - printk(KERN_ERR "%s :subsys_create_file failed", __FUNCTION__); + error = subsys_create_file(&power_subsys, &sleep_while_idle_attr); + if (error) + printk(KERN_ERR "subsys_create_file failed: %d\n", error); #endif if (cpu_is_omap16xx()) { -- 2.41.1