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
This commit is contained in:
parent
93604a5ade
commit
dae7fbf43f
|
@ -11,13 +11,14 @@
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/notifier.h>
|
#include <linux/notifier.h>
|
||||||
#include <linux/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
#include <linux/fb.h>
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <asm/firmware.h>
|
#include <asm/firmware.h>
|
||||||
#include <asm/ps3av.h>
|
#include <asm/ps3av.h>
|
||||||
#include <asm/ps3.h>
|
#include <asm/ps3.h>
|
||||||
|
|
||||||
|
#include <video/cmdline.h>
|
||||||
|
|
||||||
#include "vuart.h"
|
#include "vuart.h"
|
||||||
|
|
||||||
#define BUFSIZE 4096 /* vuart buf size */
|
#define BUFSIZE 4096 /* vuart buf size */
|
||||||
|
@ -921,9 +922,7 @@ EXPORT_SYMBOL_GPL(ps3av_audio_mute);
|
||||||
|
|
||||||
static int ps3av_probe(struct ps3_system_bus_device *dev)
|
static int ps3av_probe(struct ps3_system_bus_device *dev)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_FB
|
const char *mode_option;
|
||||||
char *mode_option = NULL;
|
|
||||||
#endif
|
|
||||||
int res;
|
int res;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
@ -971,14 +970,9 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
|
||||||
|
|
||||||
ps3av_get_hw_conf(ps3av);
|
ps3av_get_hw_conf(ps3av);
|
||||||
|
|
||||||
#ifdef CONFIG_FB
|
mode_option = video_get_options(NULL);
|
||||||
fb_get_options(NULL, &mode_option);
|
if (mode_option && !strcmp(mode_option, "safe"))
|
||||||
if (mode_option) {
|
safe_mode = 1;
|
||||||
if (!strcmp(mode_option, "safe"))
|
|
||||||
safe_mode = 1;
|
|
||||||
kfree(mode_option);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_FB */
|
|
||||||
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
|
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
|
printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
|
||||||
|
|
Loading…
Reference in New Issue