aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/ps3av.h2
-rw-r--r--drivers/ps3/ps3av.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/ps3av.h b/arch/powerpc/include/asm/ps3av.h
index cd24ac16660a..0427b0b53d2d 100644
--- a/arch/powerpc/include/asm/ps3av.h
+++ b/arch/powerpc/include/asm/ps3av.h
@@ -730,7 +730,7 @@ extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *);
730extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, 730extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *,
731 u32); 731 u32);
732 732
733extern int ps3av_set_video_mode(u32); 733extern int ps3av_set_video_mode(int);
734extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); 734extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
735extern int ps3av_get_auto_mode(void); 735extern int ps3av_get_auto_mode(void);
736extern int ps3av_get_mode(void); 736extern int ps3av_get_mode(void);
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 5324978b73fb..235e87fcb49f 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -838,7 +838,7 @@ static int ps3av_get_hw_conf(struct ps3av *ps3av)
838} 838}
839 839
840/* set mode using id */ 840/* set mode using id */
841int ps3av_set_video_mode(u32 id) 841int ps3av_set_video_mode(int id)
842{ 842{
843 int size; 843 int size;
844 u32 option; 844 u32 option;
@@ -940,7 +940,7 @@ EXPORT_SYMBOL_GPL(ps3av_audio_mute);
940static int ps3av_probe(struct ps3_system_bus_device *dev) 940static int ps3av_probe(struct ps3_system_bus_device *dev)
941{ 941{
942 int res; 942 int res;
943 u32 id; 943 int id;
944 944
945 dev_dbg(&dev->core, " -> %s:%d\n", __func__, __LINE__); 945 dev_dbg(&dev->core, " -> %s:%d\n", __func__, __LINE__);
946 dev_dbg(&dev->core, " timeout=%d\n", timeout); 946 dev_dbg(&dev->core, " timeout=%d\n", timeout);
@@ -962,8 +962,10 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
962 init_completion(&ps3av->done); 962 init_completion(&ps3av->done);
963 complete(&ps3av->done); 963 complete(&ps3av->done);
964 ps3av->wq = create_singlethread_workqueue("ps3avd"); 964 ps3av->wq = create_singlethread_workqueue("ps3avd");
965 if (!ps3av->wq) 965 if (!ps3av->wq) {
966 res = -ENOMEM;
966 goto fail; 967 goto fail;
968 }
967 969
968 switch (ps3_os_area_get_av_multi_out()) { 970 switch (ps3_os_area_get_av_multi_out()) {
969 case PS3_PARAM_AV_MULTI_OUT_NTSC: 971 case PS3_PARAM_AV_MULTI_OUT_NTSC:
@@ -994,6 +996,12 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
994 safe_mode = 1; 996 safe_mode = 1;
995#endif /* CONFIG_FB */ 997#endif /* CONFIG_FB */
996 id = ps3av_auto_videomode(&ps3av->av_hw_conf); 998 id = ps3av_auto_videomode(&ps3av->av_hw_conf);
999 if (id < 0) {
1000 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
1001 res = -EINVAL;
1002 goto fail;
1003 }
1004
997 safe_mode = 0; 1005 safe_mode = 0;
998 1006
999 mutex_lock(&ps3av->mutex); 1007 mutex_lock(&ps3av->mutex);
@@ -1007,7 +1015,7 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
1007fail: 1015fail:
1008 kfree(ps3av); 1016 kfree(ps3av);
1009 ps3av = NULL; 1017 ps3av = NULL;
1010 return -ENOMEM; 1018 return res;
1011} 1019}
1012 1020
1013static int ps3av_remove(struct ps3_system_bus_device *dev) 1021static int ps3av_remove(struct ps3_system_bus_device *dev)