aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c20
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 c02ef7c0f7ef..850538fadece 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)
467{ 467{
468 if (get_hsync_time) 468 if (get_hsync_time)
469 symbol_put(w100fb_get_hsynclen); 469 symbol_put(w100fb_get_hsynclen);
470 get_hsync_time = NULL;
470} 471}
471 472
472void corgi_wait_hsync(void) 473void corgi_wait_hsync(void)
@@ -476,20 +477,37 @@ void corgi_wait_hsync(void)
476#endif 477#endif
477 478
478#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
479unsigned long spitz_get_hsync_len(void) 489unsigned long spitz_get_hsync_len(void)
480{ 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 }
481 if (!get_hsync_time) 496 if (!get_hsync_time)
482 get_hsync_time = symbol_get(pxafb_get_hsync_time); 497 get_hsync_time = symbol_get(pxafb_get_hsync_time);
483 if (!get_hsync_time) 498 if (!get_hsync_time)
484 return 0; 499 return 0;
485 500
486 return pxafb_get_hsync_time(&pxafb_device.dev); 501 return pxafb_get_hsync_time(spitz_pxafb_dev);
487} 502}
488 503
489void spitz_put_hsync(void) 504void spitz_put_hsync(void)
490{ 505{
506 put_device(spitz_pxafb_dev);
491 if (get_hsync_time) 507 if (get_hsync_time)
492 symbol_put(pxafb_get_hsync_time); 508 symbol_put(pxafb_get_hsync_time);
509 spitz_pxafb_dev = NULL;
510 get_hsync_time = NULL;
493} 511}
494 512
495void spitz_wait_hsync(void) 513void spitz_wait_hsync(void)