summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-02-09 14:55:02 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2023-02-20 14:56:44 +0100
commitcbfb2632003d4e0bb3bc69b9ba5e39621f8aa45b (patch)
tree5e8ff6d60fbecd516c78a410515c6ae3f008fcc1
parentcedaf7cddd7339a3e189a59eec35e76c6557a6d5 (diff)
downloadlinux-stable-cbfb2632003d4e0bb3bc69b9ba5e39621f8aa45b.tar.gz
linux-stable-cbfb2632003d4e0bb3bc69b9ba5e39621f8aa45b.tar.bz2
linux-stable-cbfb2632003d4e0bb3bc69b9ba5e39621f8aa45b.zip
drivers/ps3: Read video= option with fb_get_option()
Get the kernel's global video= parameter with fb_get_option(). Done to unexport the internal fbdev state fb_mode_config. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Geoff Levand <geoff@infradead.org> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-5-tzimmermann@suse.de
-rw-r--r--drivers/ps3/ps3av.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 516e6d14d32e..8f3e60f1bfe2 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -921,6 +921,9 @@ EXPORT_SYMBOL_GPL(ps3av_audio_mute);
static int ps3av_probe(struct ps3_system_bus_device *dev)
{
+#ifdef CONFIG_FB
+ char *mode_option = NULL;
+#endif
int res;
int id;
@@ -969,8 +972,12 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
ps3av_get_hw_conf(ps3av);
#ifdef CONFIG_FB
- if (fb_mode_option && !strcmp(fb_mode_option, "safe"))
- safe_mode = 1;
+ fb_get_options(NULL, &mode_option);
+ if (mode_option) {
+ if (!strcmp(mode_option, "safe"))
+ safe_mode = 1;
+ kfree(mode_option);
+ }
#endif /* CONFIG_FB */
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
if (id < 0) {