mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 09:51:21 -04:00
fbdev/sh7760fb: Use hardware device with dev_() output during probe
Call output helpers in the probe function with the hardware device. The virtual fbdev device has not been initialized at that point. Also prepares fbdev for making struct fb_info.dev optional. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-29-tzimmermann@suse.de
This commit is contained in:
@@ -450,7 +450,7 @@ static int sh7760fb_probe(struct platform_device *pdev)
|
||||
|
||||
par->pd = pdev->dev.platform_data;
|
||||
if (!par->pd) {
|
||||
dev_dbg(info->dev, "no display setup data!\n");
|
||||
dev_dbg(&pdev->dev, "no display setup data!\n");
|
||||
ret = -ENODEV;
|
||||
goto out_fb;
|
||||
}
|
||||
@@ -519,13 +519,13 @@ static int sh7760fb_probe(struct platform_device *pdev)
|
||||
|
||||
ret = fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
if (ret) {
|
||||
dev_dbg(info->dev, "Unable to allocate cmap memory\n");
|
||||
dev_dbg(&pdev->dev, "Unable to allocate cmap memory\n");
|
||||
goto out_mem;
|
||||
}
|
||||
|
||||
ret = register_framebuffer(info);
|
||||
if (ret < 0) {
|
||||
dev_dbg(info->dev, "cannot register fb!\n");
|
||||
dev_dbg(&pdev->dev, "cannot register fb!\n");
|
||||
goto out_cmap;
|
||||
}
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
Reference in New Issue
Block a user