aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/corgi_lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/corgi_lcd.c')
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
index c5efcd04fcb..850538fadec 100644
--- a/arch/arm/mach-pxa/corgi_lcd.c
+++ b/arch/arm/mach-pxa/corgi_lcd.c
@@ -19,7 +19,6 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <asm/mach-types.h>
23#include <asm/arch/akita.h> 22#include <asm/arch/akita.h>
24#include <asm/arch/corgi.h> 23#include <asm/arch/corgi.h>
25#include <asm/arch/hardware.h> 24#include <asm/arch/hardware.h>
@@ -468,6 +467,7 @@ void corgi_put_hsync(void)
468{ 467{
469 if (get_hsync_time) 468 if (get_hsync_time)
470 symbol_put(w100fb_get_hsynclen); 469 symbol_put(w100fb_get_hsynclen);
470 get_hsync_time = NULL;
471} 471}
472 472
473void corgi_wait_hsync(void) 473void corgi_wait_hsync(void)
@@ -477,20 +477,37 @@ void corgi_wait_hsync(void)
477#endif 477#endif
478 478
479#ifdef CONFIG_PXA_SHARP_Cxx00 479#ifdef CONFIG_PXA_SHARP_Cxx00
480static struct device *spitz_pxafb_dev;
481
482static int is_pxafb_device(struct device * dev, void * data)
483{
484 struct platform_device *pdev = container_of(dev, struct platform_device, dev);
485
486 return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0);
487}
488
480unsigned long spitz_get_hsync_len(void) 489unsigned long spitz_get_hsync_len(void)
481{ 490{
491 if (!spitz_pxafb_dev) {
492 spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device);
493 if (!spitz_pxafb_dev)
494 return 0;
495 }
482 if (!get_hsync_time) 496 if (!get_hsync_time)
483 get_hsync_time = symbol_get(pxafb_get_hsync_time); 497 get_hsync_time = symbol_get(pxafb_get_hsync_time);
484 if (!get_hsync_time) 498 if (!get_hsync_time)
485 return 0; 499 return 0;
486 500
487 return pxafb_get_hsync_time(&pxafb_device.dev); 501 return pxafb_get_hsync_time(spitz_pxafb_dev);
488} 502}
489 503
490void spitz_put_hsync(void) 504void spitz_put_hsync(void)
491{ 505{
506 put_device(spitz_pxafb_dev);
492 if (get_hsync_time) 507 if (get_hsync_time)
493 symbol_put(pxafb_get_hsync_time); 508 symbol_put(pxafb_get_hsync_time);
509 spitz_pxafb_dev = NULL;
510 get_hsync_time = NULL;
494} 511}
495 512
496void spitz_wait_hsync(void) 513void spitz_wait_hsync(void)