[ARM] 3011/1: pxafb: Add ability to set device parent + fix spitz compile error
authorRichard Purdie <rpurdie@rpsys.net>
Fri, 14 Oct 2005 15:07:25 +0000 (16:07 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 14 Oct 2005 15:07:25 +0000 (16:07 +0100)
Patch from Richard Purdie

Add a function to allow machines to set the parent of the pxa
framebuffer device. This means the power up/down sequence can be
controlled where required by the machine.

Update spitz to use the new function, fixing a compile error.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/spitz.c
include/asm-arm/arch-pxa/pxafb.h

index d0660a8c4b704429111daa3bc607e3ac0b582550..d327c127eddbefb6ece11b25e8e91e9536c43b97 100644 (file)
@@ -208,6 +208,11 @@ static struct platform_device pxafb_device = {
        .resource       = pxafb_resources,
 };
 
+void __init set_pxa_fb_parent(struct device *parent_dev)
+{
+       pxafb_device.dev.parent = parent_dev;
+}
+
 static struct platform_device ffuart_device = {
        .name           = "pxa2xx-uart",
        .id             = 0,
index 568afe3d6e1a022de1b95becaaa7760082112291..7eaeb24aae1ecde5a61bba6353539228d1daf816 100644 (file)
@@ -328,7 +328,7 @@ static void __init common_init(void)
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_mci_info(&spitz_mci_platform_data);
-       pxafb_device.dev.parent = &spitzssp_device.dev;
+       set_pxa_fb_parent(&spitzssp_device.dev);
        set_pxa_fb_info(&spitz_pxafb_info);
 }
 
index 21c0e16dce5fe3d71721208e657aa9812a8cae1f..aba9b30f42490cbcfe6aab1e090662755cf0b913 100644 (file)
@@ -66,4 +66,5 @@ struct pxafb_mach_info {
 
 };
 void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
+void set_pxa_fb_parent(struct device *parent_dev);
 unsigned long pxafb_get_hsync_time(struct device *dev);