linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: omapfb: delete check_required_callbacks()
@ 2017-04-07 19:04 ` Aaro Koskinen
  2017-04-14 11:39   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2017-04-07 19:04 UTC (permalink / raw)
  To: Tomi Valkeinen, Bartlomiej Zolnierkiewicz, Lars-Peter Clausen
  Cc: linux-fbdev, linux-omap, linux-kernel, Aaro Koskinen

Commit 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional") made
panel callbacks optional but forgot to update check_required_callbacks().
As a result many (all?) OMAP systems using omapfb will crash at boot.
Fix by deleting the whole function.

Fixes: 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 drivers/video/fbdev/omap/omapfb_main.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index 1abba07..f4cbfb3 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1608,19 +1608,6 @@ static int omapfb_find_ctrl(struct omapfb_device *fbdev)
 	return 0;
 }
 
-static void check_required_callbacks(struct omapfb_device *fbdev)
-{
-#define _C(x) (fbdev->ctrl->x != NULL)
-#define _P(x) (fbdev->panel->x != NULL)
-	BUG_ON(fbdev->ctrl == NULL || fbdev->panel == NULL);
-	BUG_ON(!(_C(init) && _C(cleanup) && _C(get_caps) &&
-		 _C(set_update_mode) && _C(setup_plane) && _C(enable_plane) &&
-		 _P(init) && _P(cleanup) && _P(enable) && _P(disable) &&
-		 _P(get_caps)));
-#undef _P
-#undef _C
-}
-
 /*
  * Called by LDM binding to probe and attach a new device.
  * Initialization sequence:
@@ -1705,8 +1692,6 @@ static int omapfb_do_probe(struct platform_device *pdev,
 		omapfb_ops.fb_mmap = omapfb_mmap;
 	init_state++;
 
-	check_required_callbacks(fbdev);
-
 	r = planes_init(fbdev);
 	if (r)
 		goto cleanup;
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbdev: omapfb: delete check_required_callbacks()
  2017-04-07 19:04 ` [PATCH] fbdev: omapfb: delete check_required_callbacks() Aaro Koskinen
@ 2017-04-14 11:39   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-14 11:39 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: Tomi Valkeinen, Lars-Peter Clausen, linux-fbdev, linux-omap,
	linux-kernel


Hi,

On Friday, April 07, 2017 10:04:07 PM Aaro Koskinen wrote:
> Commit 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional") made
> panel callbacks optional but forgot to update check_required_callbacks().
> As a result many (all?) OMAP systems using omapfb will crash at boot.
> Fix by deleting the whole function.
> 
> Fixes: 561eb9d09a93 ("fbdev: omap/lcd: Make callbacks optional")
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Patch queued for 4.11, thanks!

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-14 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170407191340epcas4p11d5a19fff9d86cae47195552421a3ae0@epcas4p1.samsung.com>
2017-04-07 19:04 ` [PATCH] fbdev: omapfb: delete check_required_callbacks() Aaro Koskinen
2017-04-14 11:39   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).