Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver/ps3: Include <video/cmdline.h> for mode parsing

Include <video/cmdline.h> in ps3av.c to get video_get_options() and
avoid the dependency on <linux/fb.h>. The replaced function
fb_get_options() is just a tiny wrapper around video_get_opions(). No
functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-10-tzimmermann@suse.de

+6 -12
+6 -12
drivers/ps3/ps3av.c
··· 11 11 #include <linux/delay.h> 12 12 #include <linux/notifier.h> 13 13 #include <linux/ioctl.h> 14 - #include <linux/fb.h> 15 14 #include <linux/slab.h> 16 15 17 16 #include <asm/firmware.h> 18 17 #include <asm/ps3av.h> 19 18 #include <asm/ps3.h> 19 + 20 + #include <video/cmdline.h> 20 21 21 22 #include "vuart.h" 22 23 ··· 922 921 923 922 static int ps3av_probe(struct ps3_system_bus_device *dev) 924 923 { 925 - #ifdef CONFIG_FB 926 - char *mode_option = NULL; 927 - #endif 924 + const char *mode_option; 928 925 int res; 929 926 int id; 930 927 ··· 970 971 971 972 ps3av_get_hw_conf(ps3av); 972 973 973 - #ifdef CONFIG_FB 974 - fb_get_options(NULL, &mode_option); 975 - if (mode_option) { 976 - if (!strcmp(mode_option, "safe")) 977 - safe_mode = 1; 978 - kfree(mode_option); 979 - } 980 - #endif /* CONFIG_FB */ 974 + mode_option = video_get_options(NULL); 975 + if (mode_option && !strcmp(mode_option, "safe")) 976 + safe_mode = 1; 981 977 id = ps3av_auto_videomode(&ps3av->av_hw_conf); 982 978 if (id < 0) { 983 979 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);