diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-14 17:16:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-14 17:16:35 -0700 |
commit | 9e04099cb90dce6a34b4cbc6b4a0d4e4cc4c5680 (patch) | |
tree | 30c96145b80941b1e59c4c32df3616cc2f33125f /arch/arm/mach-pxa/corgi_lcd.c | |
parent | 757e0108473787f470294ce77bf703fedddfce7d (diff) | |
parent | 414894938b88c1ad2e9cea6502ceccefb30605c4 (diff) | |
download | kernel_goldelico_gta04-9e04099cb90dce6a34b4cbc6b4a0d4e4cc4c5680.zip kernel_goldelico_gta04-9e04099cb90dce6a34b4cbc6b4a0d4e4cc4c5680.tar.gz kernel_goldelico_gta04-9e04099cb90dce6a34b4cbc6b4a0d4e4cc4c5680.tar.bz2 |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'arch/arm/mach-pxa/corgi_lcd.c')
-rw-r--r-- | arch/arm/mach-pxa/corgi_lcd.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c index c02ef7c..850538f 100644 --- a/arch/arm/mach-pxa/corgi_lcd.c +++ b/arch/arm/mach-pxa/corgi_lcd.c @@ -467,6 +467,7 @@ void corgi_put_hsync(void) { if (get_hsync_time) symbol_put(w100fb_get_hsynclen); + get_hsync_time = NULL; } void corgi_wait_hsync(void) @@ -476,20 +477,37 @@ void corgi_wait_hsync(void) #endif #ifdef CONFIG_PXA_SHARP_Cxx00 +static struct device *spitz_pxafb_dev; + +static int is_pxafb_device(struct device * dev, void * data) +{ + struct platform_device *pdev = container_of(dev, struct platform_device, dev); + + return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0); +} + unsigned long spitz_get_hsync_len(void) { + if (!spitz_pxafb_dev) { + spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device); + if (!spitz_pxafb_dev) + return 0; + } if (!get_hsync_time) get_hsync_time = symbol_get(pxafb_get_hsync_time); if (!get_hsync_time) return 0; - return pxafb_get_hsync_time(&pxafb_device.dev); + return pxafb_get_hsync_time(spitz_pxafb_dev); } void spitz_put_hsync(void) { + put_device(spitz_pxafb_dev); if (get_hsync_time) symbol_put(pxafb_get_hsync_time); + spitz_pxafb_dev = NULL; + get_hsync_time = NULL; } void spitz_wait_hsync(void) |