diff options
author | Koen Kooi <koen@openembedded.org> | 2008-09-04 16:39:33 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2008-09-04 16:39:33 +0000 |
commit | 7a66e7a528dd38a5ea363c30f7110967b6cdd03c (patch) | |
tree | b1bfa7bb4555aec907eea4cd17377829d0894964 /packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff | |
parent | 474a816e54c0c5e3135e05eb91022024e1e437b5 (diff) |
linux-omap: a new recipe to build omap1, omap2 and omap3 kernels
Diffstat (limited to 'packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff')
-rw-r--r-- | packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff b/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff new file mode 100644 index 0000000000..faee384e74 --- /dev/null +++ b/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff @@ -0,0 +1,67 @@ +From: Mans Rullgard <mans@mansr.com> +Date: Wed, 3 Sep 2008 20:57:59 +0000 (+0100) +Subject: OMAP: Add omapfb_unregister_panel() function +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=85b5d3ba7221193cb2315256b69e97f34d2ae3b7 + +OMAP: Add omapfb_unregister_panel() function + +This adds the function omapfb_unregister_panel() for use by LCD +drivers built as modules. + +Signed-off-by: Mans Rullgard <mans@mansr.com> +--- + +diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h +index a4a84f3..3ccb076 100644 +--- a/arch/arm/plat-omap/include/mach/omapfb.h ++++ b/arch/arm/plat-omap/include/mach/omapfb.h +@@ -378,6 +378,7 @@ extern struct lcd_ctrl omap2_disp_ctrl; + + extern void omapfb_reserve_sdram(void); + extern void omapfb_register_panel(struct lcd_panel *panel); ++extern void omapfb_unregister_panel(struct lcd_panel *panel); + extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval); + extern void omapfb_notify_clients(struct omapfb_device *fbdev, + unsigned long event); +diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c +index 912cb0c..6d09e03 100644 +--- a/drivers/video/omap/omapfb_main.c ++++ b/drivers/video/omap/omapfb_main.c +@@ -1736,7 +1736,8 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) + case 7: + omapfb_unregister_sysfs(fbdev); + case 6: +- fbdev->panel->disable(fbdev->panel); ++ if (fbdev->panel) ++ fbdev->panel->disable(fbdev->panel); + case 5: + omapfb_set_update_mode(fbdev, OMAPFB_UPDATE_DISABLED); + case 4: +@@ -1744,7 +1745,8 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) + case 3: + ctrl_cleanup(fbdev); + case 2: +- fbdev->panel->cleanup(fbdev->panel); ++ if (fbdev->panel) ++ fbdev->panel->cleanup(fbdev->panel); + case 1: + dev_set_drvdata(fbdev->dev, NULL); + kfree(fbdev); +@@ -1999,6 +2001,17 @@ void omapfb_register_panel(struct lcd_panel *panel) + } + EXPORT_SYMBOL(omapfb_register_panel); + ++void omapfb_unregister_panel(struct lcd_panel *panel) ++{ ++ BUG_ON(fbdev_panel != panel); ++ ++ panel->disable(panel); ++ ++ omapfb_dev->panel = NULL; ++ fbdev_panel = NULL; ++} ++EXPORT_SYMBOL(omapfb_unregister_panel); ++ + /* Called when the device is being detached from the driver */ + static int omapfb_remove(struct platform_device *pdev) + { |