diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2005-10-14 11:07:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-14 11:07:26 -0400 |
commit | 10f92eb7c6b4e8069c2defd2ad23b74f31f8962d (patch) | |
tree | 0ab8f965123b8215ff44c69f30c9da5996e35bdf /arch | |
parent | cb38c569e5ecf9e922e66963b6da2751b4f13d81 (diff) |
[ARM] 3012/1: Corgi/Spitz LCD: Use bus_find_device to locate pxafb - fix compile error
Patch from Richard Purdie
Update corgi_lcd to use bus_find_device to locate the pxafb device
hence fixing a compile error.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-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 c02ef7c0f7e..850538fadec 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 | ||
472 | void corgi_wait_hsync(void) | 473 | void 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 |
480 | static struct device *spitz_pxafb_dev; | ||
481 | |||
482 | static 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 | |||
479 | unsigned long spitz_get_hsync_len(void) | 489 | unsigned 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 | ||
489 | void spitz_put_hsync(void) | 504 | void 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 | ||
495 | void spitz_wait_hsync(void) | 513 | void spitz_wait_hsync(void) |