Patch "video: fbdev: gbefb: Only instantiate device when built for IP32" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    video: fbdev: gbefb: Only instantiate device when built for IP32

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     video-fbdev-gbefb-only-instantiate-device-when-built.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 12e61ba7f3427b5bd7af17ee399e247affe330e3
Author: Mark Brown <broonie@xxxxxxxxxx>
Date:   Tue Sep 21 22:21:02 2021 +0100

    video: fbdev: gbefb: Only instantiate device when built for IP32
    
    [ Upstream commit 11b8e2bb986d23157e82e267fb8cc6b281dfdee9 ]
    
    The gbefb driver not only registers a driver but also the device for that
    driver. This is all well and good when run on the IP32 machines that are
    supported by the driver but since the driver supports building with
    COMPILE_TEST we might also be building on other platforms which do not have
    this hardware and will crash instantiating the driver. Add an IS_ENABLED()
    check so we compile out the device registration if we don't have the Kconfig
    option for the machine enabled.
    
    Fixes: 552ccf6b259d290c0c ("video: fbdev: gbefb: add COMPILE_TEST support")
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
    Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210921212102.30803-1-broonie@xxxxxxxxxx
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c
index 31270a8986e8..8f8ca1f88fe2 100644
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -1269,7 +1269,7 @@ static struct platform_device *gbefb_device;
 static int __init gbefb_init(void)
 {
 	int ret = platform_driver_register(&gbefb_driver);
-	if (!ret) {
+	if (IS_ENABLED(CONFIG_SGI_IP32) && !ret) {
 		gbefb_device = platform_device_alloc("gbefb", 0);
 		if (gbefb_device) {
 			ret = platform_device_add(gbefb_device);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux