Skip to content

Commit 401a49b

Browse files
tdzgregkh
authored andcommitted
firmware: google: framebuffer: Do not unregister platform device
[ Upstream commit 5cd28bd ] The native driver takes over the framebuffer aperture by removing the system- framebuffer platform device. Afterwards the pointer in drvdata is dangling. Remove the entire logic around drvdata and let the kernel's aperture helpers handle this. The platform device depends on the native hardware device instead of the coreboot device anyway. When commit 851b4c1 ("firmware: coreboot: Add coreboot framebuffer driver") added the coreboot framebuffer code, the kernel did not support device-based aperture management. Instead native driviers only removed the conflicting fbdev device. At that point, unregistering the framebuffer device most likely worked correctly. It was definitely broken after commit d9702b2 ("fbdev/simplefb: Do not use struct fb_info.apertures"). So take this commit for the Fixes tag. Earlier releases might work depending on the native hardware driver. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: d9702b2 ("fbdev/simplefb: Do not use struct fb_info.apertures") Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Acked-by: Julius Werner <jwerner@chromium.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Hans de Goede <hansg@kernel.org> Cc: linux-fbdev@vger.kernel.org Cc: <stable@vger.kernel.org> # v6.3+ Link: https://patch.msgid.link/20260217155836.96267-2-tzimmermann@suse.de Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2a40f8b commit 401a49b

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

drivers/firmware/google/framebuffer-coreboot.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,12 @@ static int framebuffer_probe(struct coreboot_device *dev)
6464
sizeof(pdata));
6565
if (IS_ERR(pdev))
6666
pr_warn("coreboot: could not register framebuffer\n");
67-
else
68-
dev_set_drvdata(&dev->dev, pdev);
6967

7068
return PTR_ERR_OR_ZERO(pdev);
7169
}
7270

73-
static void framebuffer_remove(struct coreboot_device *dev)
74-
{
75-
struct platform_device *pdev = dev_get_drvdata(&dev->dev);
76-
77-
platform_device_unregister(pdev);
78-
}
79-
8071
static struct coreboot_driver framebuffer_driver = {
8172
.probe = framebuffer_probe,
82-
.remove = framebuffer_remove,
8373
.drv = {
8474
.name = "framebuffer",
8575
},

0 commit comments

Comments
 (0)