From 97b705ad835f1481270c4b67b402d6e37fa8ad15 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 12 Feb 2008 17:13:36 -0800 Subject: [PATCH] ARM: OMAP: Misc compile fixes after syncing with mainline Also fix 2430 smc91x to use IRQ_LOWLEVEL. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/pm.c | 25 ++++++++++--------------- arch/arm/plat-omap/mmu.c | 2 +- drivers/cbus/retu-rtc.c | 4 ++-- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 595c190b399..c2d3c4d0c70 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -117,7 +117,7 @@ static struct resource sdp2430_smc91x_resources[] = { [1] = { .start = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ), .end = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ), - .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, }, }; diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 961aa7e2a31..f3a316ff04a 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -56,7 +56,7 @@ static struct resource sdp3430_smc91x_resources[] = { [1] = { .start = 0, .end = 0, - .flags = IORESOURCE_IRQ, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, }, }; diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index c0f757a00af..a1fe348b2cb 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -321,14 +321,14 @@ static inline void serial_console_fclk_mask(u32 *f1, u32 *f2) {} static unsigned short enable_dyn_sleep = 0; /* disabled till drivers are fixed */ -static ssize_t omap_pm_sleep_while_idle_show(struct kset * subsys, char *buf) +static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf) { return sprintf(buf, "%hu\n", enable_dyn_sleep); } -static ssize_t omap_pm_sleep_while_idle_store(struct kset * subsys, - const char * buf, - size_t n) +static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr, + const char * buf, size_t n) { unsigned short value; if (sscanf(buf, "%hu", &value) != 1 || @@ -340,14 +340,8 @@ static ssize_t omap_pm_sleep_while_idle_store(struct kset * subsys, return n; } -static struct subsys_attribute sleep_while_idle_attr = { - .attr = { - .name = __stringify(sleep_while_idle), - .mode = 0644, - }, - .show = omap_pm_sleep_while_idle_show, - .store = omap_pm_sleep_while_idle_store, -}; +static struct kobj_attribute sleep_while_idle_attr = + __ATTR(sleep_while_idle, 0644, idle_show, idle_store); static struct clk *osc_ck, *emul_ck; @@ -786,6 +780,7 @@ static void __init prcm_setup_regs(void) int __init omap2_pm_init(void) { u32 l; + int error; printk(KERN_INFO "Power Management for OMAP2 initializing\n"); l = prm_read_reg(OMAP24XX_PRCM_REVISION); @@ -842,9 +837,9 @@ int __init omap2_pm_init(void) suspend_set_ops(&omap_pm_ops); pm_idle = omap2_pm_idle; - l = subsys_create_file(&power_subsys, &sleep_while_idle_attr); - if (l) - printk(KERN_ERR "subsys_create_file failed: %d\n", l); + error = sysfs_create_file(power_kobj, &sleep_while_idle_attr); + if (error) + printk(KERN_ERR "sysfs_create_file failed: %d\n", error); return 0; } diff --git a/arch/arm/plat-omap/mmu.c b/arch/arm/plat-omap/mmu.c index b7ae3d21237..191cb558895 100644 --- a/arch/arm/plat-omap/mmu.c +++ b/arch/arm/plat-omap/mmu.c @@ -492,7 +492,7 @@ static void omap_mmu_clear_pte(struct omap_mmu *mmu, unsigned long virt) goto out; ptep++; } - pte_free_kernel(pmd_page_vaddr(*pmdp)); + pte_free_kernel(mm, pmd_page_vaddr(*pmdp)); invalidate_pmd: pmd_clear(pmdp); diff --git a/drivers/cbus/retu-rtc.c b/drivers/cbus/retu-rtc.c index 5d435201969..1ebc33b6fb4 100644 --- a/drivers/cbus/retu-rtc.c +++ b/drivers/cbus/retu-rtc.c @@ -303,7 +303,7 @@ static ssize_t retu_rtc_cal_store(struct device *dev, struct device_attribute *a static DEVICE_ATTR(cal, S_IRUGO | S_IWUSR, retu_rtc_cal_show, retu_rtc_cal_store); -static struct device_driver retu_rtc_driver; +static struct platform_device retu_rtc_device; static void retu_rtca_disable(void) { @@ -316,7 +316,7 @@ static void retu_rtca_disable(void) static void retu_rtca_expired(struct work_struct *unused) { retu_rtca_disable(); - sysfs_notify(&retu_rtc_driver.kobj, NULL, "alarm_expired"); + sysfs_notify(&retu_rtc_device.dev.kobj, NULL, "alarm_expired"); } DECLARE_WORK(retu_rtca_work, retu_rtca_expired); -- 2.41.0