aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ps3
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
commit02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch)
tree04ef573cd4de095c500c9fc3477f4278c0b36300 /drivers/ps3
parent7487a2245b8841c77ba9db406cf99a483b9334e9 (diff)
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/ps3')
-rw-r--r--drivers/ps3/ps3av.c108
-rw-r--r--drivers/ps3/ps3av_cmd.c20
2 files changed, 72 insertions, 56 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index d21e04ccb021..1393e64335f9 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -38,7 +38,24 @@
38static int timeout = 5000; /* in msec ( 5 sec ) */ 38static int timeout = 5000; /* in msec ( 5 sec ) */
39module_param(timeout, int, 0644); 39module_param(timeout, int, 0644);
40 40
41static struct ps3av ps3av; 41static struct ps3av {
42 int available;
43 struct mutex mutex;
44 struct work_struct work;
45 struct completion done;
46 struct workqueue_struct *wq;
47 int open_count;
48 struct ps3_vuart_port_device *dev;
49
50 int region;
51 struct ps3av_pkt_av_get_hw_conf av_hw_conf;
52 u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX];
53 u32 opt_port[PS3AV_OPT_PORT_MAX];
54 u32 head[PS3AV_HEAD_MAX];
55 u32 audio_port;
56 int ps3av_mode;
57 int ps3av_mode_old;
58} ps3av;
42 59
43static struct ps3_vuart_port_device ps3av_dev = { 60static struct ps3_vuart_port_device ps3av_dev = {
44 .match_id = PS3_MATCH_ID_AV_SETTINGS 61 .match_id = PS3_MATCH_ID_AV_SETTINGS
@@ -159,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr)
159 else 176 else
160 printk(KERN_ERR 177 printk(KERN_ERR
161 "%s: failed event packet, cid:%08x size:%d\n", 178 "%s: failed event packet, cid:%08x size:%d\n",
162 __FUNCTION__, hdr->cid, hdr->size); 179 __func__, hdr->cid, hdr->size);
163 return 1; /* receive event packet */ 180 return 1; /* receive event packet */
164 } 181 }
165 return 0; 182 return 0;
@@ -181,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
181 if (res < 0) { 198 if (res < 0) {
182 dev_dbg(&ps3av_dev.core, 199 dev_dbg(&ps3av_dev.core,
183 "%s: ps3av_vuart_write() failed (result=%d)\n", 200 "%s: ps3av_vuart_write() failed (result=%d)\n",
184 __FUNCTION__, res); 201 __func__, res);
185 return res; 202 return res;
186 } 203 }
187 204
@@ -194,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
194 if (res != PS3AV_HDR_SIZE) { 211 if (res != PS3AV_HDR_SIZE) {
195 dev_dbg(&ps3av_dev.core, 212 dev_dbg(&ps3av_dev.core,
196 "%s: ps3av_vuart_read() failed (result=%d)\n", 213 "%s: ps3av_vuart_read() failed (result=%d)\n",
197 __FUNCTION__, res); 214 __func__, res);
198 return res; 215 return res;
199 } 216 }
200 217
@@ -204,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
204 if (res < 0) { 221 if (res < 0) {
205 dev_dbg(&ps3av_dev.core, 222 dev_dbg(&ps3av_dev.core,
206 "%s: ps3av_vuart_read() failed (result=%d)\n", 223 "%s: ps3av_vuart_read() failed (result=%d)\n",
207 __FUNCTION__, res); 224 __func__, res);
208 return res; 225 return res;
209 } 226 }
210 res += PS3AV_HDR_SIZE; /* total len */ 227 res += PS3AV_HDR_SIZE; /* total len */
@@ -214,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
214 231
215 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) { 232 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
216 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n", 233 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
217 __FUNCTION__, recv_buf->cid); 234 __func__, recv_buf->cid);
218 return -EINVAL; 235 return -EINVAL;
219 } 236 }
220 237
@@ -250,7 +267,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
250 struct ps3av_send_hdr *buf) 267 struct ps3av_send_hdr *buf)
251{ 268{
252 int res = 0; 269 int res = 0;
253 union { 270 static union {
254 struct ps3av_reply_hdr reply_hdr; 271 struct ps3av_reply_hdr reply_hdr;
255 u8 raw[PS3AV_BUF_SIZE]; 272 u8 raw[PS3AV_BUF_SIZE];
256 } recv_buf; 273 } recv_buf;
@@ -259,8 +276,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
259 276
260 BUG_ON(!ps3av.available); 277 BUG_ON(!ps3av.available);
261 278
262 if (down_interruptible(&ps3av.sem)) 279 mutex_lock(&ps3av.mutex);
263 return -ERESTARTSYS;
264 280
265 table = ps3av_search_cmd_table(cid, PS3AV_CID_MASK); 281 table = ps3av_search_cmd_table(cid, PS3AV_CID_MASK);
266 BUG_ON(!table); 282 BUG_ON(!table);
@@ -277,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
277 if (res < 0) { 293 if (res < 0) {
278 printk(KERN_ERR 294 printk(KERN_ERR
279 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n", 295 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
280 __FUNCTION__, res); 296 __func__, res);
281 goto err; 297 goto err;
282 } 298 }
283 299
@@ -286,16 +302,16 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
286 usr_buf_size); 302 usr_buf_size);
287 if (res < 0) { 303 if (res < 0) {
288 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n", 304 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
289 __FUNCTION__, res); 305 __func__, res);
290 goto err; 306 goto err;
291 } 307 }
292 308
293 up(&ps3av.sem); 309 mutex_unlock(&ps3av.mutex);
294 return 0; 310 return 0;
295 311
296 err: 312 err:
297 up(&ps3av.sem); 313 mutex_unlock(&ps3av.mutex);
298 printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res); 314 printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
299 return res; 315 return res;
300} 316}
301 317
@@ -440,7 +456,7 @@ static int ps3av_set_videomode(void)
440 ps3av_set_av_video_mute(PS3AV_CMD_MUTE_ON); 456 ps3av_set_av_video_mute(PS3AV_CMD_MUTE_ON);
441 457
442 /* wake up ps3avd to do the actual video mode setting */ 458 /* wake up ps3avd to do the actual video mode setting */
443 up(&ps3av.ping); 459 queue_work(ps3av.wq, &ps3av.work);
444 460
445 return 0; 461 return 0;
446} 462}
@@ -506,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
506 if (res == PS3AV_STATUS_NO_SYNC_HEAD) 522 if (res == PS3AV_STATUS_NO_SYNC_HEAD)
507 printk(KERN_WARNING 523 printk(KERN_WARNING
508 "%s: Command failed. Please try your request again. \n", 524 "%s: Command failed. Please try your request again. \n",
509 __FUNCTION__); 525 __func__);
510 else if (res) 526 else if (res)
511 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n"); 527 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");
512 528
@@ -515,18 +531,10 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
515 ps3av_set_av_video_mute(PS3AV_CMD_MUTE_OFF); 531 ps3av_set_av_video_mute(PS3AV_CMD_MUTE_OFF);
516} 532}
517 533
518static int ps3avd(void *p) 534static void ps3avd(struct work_struct *work)
519{ 535{
520 struct ps3av *info = p; 536 ps3av_set_videomode_cont(ps3av.ps3av_mode, ps3av.ps3av_mode_old);
521 537 complete(&ps3av.done);
522 daemonize("ps3avd");
523 while (1) {
524 down(&info->ping);
525 ps3av_set_videomode_cont(info->ps3av_mode,
526 info->ps3av_mode_old);
527 up(&info->pong);
528 }
529 return 0;
530} 538}
531 539
532static int ps3av_vid2table_id(int vid) 540static int ps3av_vid2table_id(int vid)
@@ -707,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot)
707 715
708 size = ARRAY_SIZE(video_mode_table); 716 size = ARRAY_SIZE(video_mode_table);
709 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) { 717 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
710 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__, 718 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
711 id);
712 return -EINVAL; 719 return -EINVAL;
713 } 720 }
714 721
@@ -717,15 +724,14 @@ int ps3av_set_video_mode(u32 id, int boot)
717 if ((id & PS3AV_MODE_MASK) == 0) { 724 if ((id & PS3AV_MODE_MASK) == 0) {
718 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot); 725 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
719 if (id < 1) { 726 if (id < 1) {
720 printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__, 727 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
721 id);
722 return -EINVAL; 728 return -EINVAL;
723 } 729 }
724 id |= option; 730 id |= option;
725 } 731 }
726 732
727 /* set videomode */ 733 /* set videomode */
728 down(&ps3av.pong); 734 wait_for_completion(&ps3av.done);
729 ps3av.ps3av_mode_old = ps3av.ps3av_mode; 735 ps3av.ps3av_mode_old = ps3av.ps3av_mode;
730 ps3av.ps3av_mode = id; 736 ps3av.ps3av_mode = id;
731 if (ps3av_set_videomode()) 737 if (ps3av_set_videomode())
@@ -736,6 +742,13 @@ int ps3av_set_video_mode(u32 id, int boot)
736 742
737EXPORT_SYMBOL_GPL(ps3av_set_video_mode); 743EXPORT_SYMBOL_GPL(ps3av_set_video_mode);
738 744
745int ps3av_get_auto_mode(int boot)
746{
747 return ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
748}
749
750EXPORT_SYMBOL_GPL(ps3av_get_auto_mode);
751
739int ps3av_set_mode(u32 id, int boot) 752int ps3av_set_mode(u32 id, int boot)
740{ 753{
741 int res; 754 int res;
@@ -771,7 +784,7 @@ int ps3av_get_scanmode(int id)
771 id = id & PS3AV_MODE_MASK; 784 id = id & PS3AV_MODE_MASK;
772 size = ARRAY_SIZE(video_mode_table); 785 size = ARRAY_SIZE(video_mode_table);
773 if (id > size - 1 || id < 0) { 786 if (id > size - 1 || id < 0) {
774 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 787 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
775 return -EINVAL; 788 return -EINVAL;
776 } 789 }
777 return video_mode_table[id].interlace; 790 return video_mode_table[id].interlace;
@@ -786,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
786 id = id & PS3AV_MODE_MASK; 799 id = id & PS3AV_MODE_MASK;
787 size = ARRAY_SIZE(video_mode_table); 800 size = ARRAY_SIZE(video_mode_table);
788 if (id > size - 1 || id < 0) { 801 if (id > size - 1 || id < 0) {
789 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 802 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
790 return -EINVAL; 803 return -EINVAL;
791 } 804 }
792 return video_mode_table[id].freq; 805 return video_mode_table[id].freq;
@@ -802,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
802 id = id & PS3AV_MODE_MASK; 815 id = id & PS3AV_MODE_MASK;
803 size = ARRAY_SIZE(video_mode_table); 816 size = ARRAY_SIZE(video_mode_table);
804 if (id > size - 1 || id < 0) { 817 if (id > size - 1 || id < 0) {
805 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 818 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
806 return -EINVAL; 819 return -EINVAL;
807 } 820 }
808 *xres = video_mode_table[id].x; 821 *xres = video_mode_table[id].x;
@@ -838,7 +851,7 @@ int ps3av_dev_open(void)
838 status = lv1_gpu_open(0); 851 status = lv1_gpu_open(0);
839 if (status) { 852 if (status) {
840 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n", 853 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
841 __FUNCTION__, status); 854 __func__, status);
842 ps3av.open_count--; 855 ps3av.open_count--;
843 } 856 }
844 } 857 }
@@ -855,13 +868,13 @@ int ps3av_dev_close(void)
855 868
856 mutex_lock(&ps3av.mutex); 869 mutex_lock(&ps3av.mutex);
857 if (ps3av.open_count <= 0) { 870 if (ps3av.open_count <= 0) {
858 printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__); 871 printk(KERN_ERR "%s: GPU already closed\n", __func__);
859 status = -1; 872 status = -1;
860 } else if (!--ps3av.open_count) { 873 } else if (!--ps3av.open_count) {
861 status = lv1_gpu_close(); 874 status = lv1_gpu_close();
862 if (status) 875 if (status)
863 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n", 876 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
864 __FUNCTION__, status); 877 __func__, status);
865 } 878 }
866 mutex_unlock(&ps3av.mutex); 879 mutex_unlock(&ps3av.mutex);
867 880
@@ -880,13 +893,16 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
880 893
881 memset(&ps3av, 0, sizeof(ps3av)); 894 memset(&ps3av, 0, sizeof(ps3av));
882 895
883 init_MUTEX(&ps3av.sem);
884 init_MUTEX_LOCKED(&ps3av.ping);
885 init_MUTEX(&ps3av.pong);
886 mutex_init(&ps3av.mutex); 896 mutex_init(&ps3av.mutex);
887 ps3av.ps3av_mode = 0; 897 ps3av.ps3av_mode = 0;
888 ps3av.dev = dev; 898 ps3av.dev = dev;
889 kernel_thread(ps3avd, &ps3av, CLONE_KERNEL); 899
900 INIT_WORK(&ps3av.work, ps3avd);
901 init_completion(&ps3av.done);
902 complete(&ps3av.done);
903 ps3av.wq = create_singlethread_workqueue("ps3avd");
904 if (!ps3av.wq)
905 return -ENOMEM;
890 906
891 ps3av.available = 1; 907 ps3av.available = 1;
892 switch (ps3_os_area_get_av_multi_out()) { 908 switch (ps3_os_area_get_av_multi_out()) {
@@ -908,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
908 /* init avsetting modules */ 924 /* init avsetting modules */
909 res = ps3av_cmd_init(); 925 res = ps3av_cmd_init();
910 if (res < 0) 926 if (res < 0)
911 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__, 927 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
912 res); 928 res);
913 929
914 ps3av_get_hw_conf(&ps3av); 930 ps3av_get_hw_conf(&ps3av);
@@ -926,6 +942,8 @@ static int ps3av_remove(struct ps3_vuart_port_device *dev)
926{ 942{
927 if (ps3av.available) { 943 if (ps3av.available) {
928 ps3av_cmd_fin(); 944 ps3av_cmd_fin();
945 if (ps3av.wq)
946 destroy_workqueue(ps3av.wq);
929 ps3av.available = 0; 947 ps3av.available = 0;
930 } 948 }
931 949
@@ -958,7 +976,7 @@ static int ps3av_module_init(void)
958 if (error) { 976 if (error) {
959 printk(KERN_ERR 977 printk(KERN_ERR
960 "%s: ps3_vuart_port_driver_register failed %d\n", 978 "%s: ps3_vuart_port_driver_register failed %d\n",
961 __FUNCTION__, error); 979 __func__, error);
962 return error; 980 return error;
963 } 981 }
964 982
@@ -966,7 +984,7 @@ static int ps3av_module_init(void)
966 if (error) 984 if (error)
967 printk(KERN_ERR 985 printk(KERN_ERR
968 "%s: ps3_vuart_port_device_register failed %d\n", 986 "%s: ps3_vuart_port_device_register failed %d\n",
969 __FUNCTION__, error); 987 __func__, error);
970 988
971 return error; 989 return error;
972} 990}
diff --git a/drivers/ps3/ps3av_cmd.c b/drivers/ps3/ps3av_cmd.c
index bc70e81f8cb0..0145ea173c42 100644
--- a/drivers/ps3/ps3av_cmd.c
+++ b/drivers/ps3/ps3av_cmd.c
@@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u32 head, int video_vid, int video_fmt,
395 video_mode->video_order = ps3av_video_fmt_table[video_fmt].order; 395 video_mode->video_order = ps3av_video_fmt_table[video_fmt].order;
396 396
397 pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n", 397 pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
398 __FUNCTION__, video_vid, video_mode->width, video_mode->height, 398 __func__, video_vid, video_mode->width, video_mode->height,
399 video_mode->pitch, video_mode->video_out_format, 399 video_mode->pitch, video_mode->video_out_format,
400 video_mode->video_format, video_mode->video_order); 400 video_mode->video_format, video_mode->video_order);
401 return sizeof(*video_mode); 401 return sizeof(*video_mode);
@@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs)
477 if (ps3av_cnv_mclk_table[i].fs == fs) 477 if (ps3av_cnv_mclk_table[i].fs == fs)
478 return ps3av_cnv_mclk_table[i].mclk; 478 return ps3av_cnv_mclk_table[i].mclk;
479 479
480 printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); 480 printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
481 return 0; 481 return 0;
482} 482}
483 483
@@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
526 d = 4; 526 d = 4;
527 break; 527 break;
528 default: 528 default:
529 printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__, 529 printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid);
530 video_vid);
531 break; 530 break;
532 } 531 }
533 532
534 if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K) 533 if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K)
535 printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); 534 printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
536 else 535 else
537 ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d]; 536 ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d];
538 537
@@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, const u8 *enable)
555 ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) | 554 ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) |
556 0x01; 555 0x01;
557 } else 556 } else
558 printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__, 557 printk(KERN_ERR "%s failed, source:%x\n", __func__, source);
559 source);
560 return ret; 558 return ret;
561} 559}
562 560
@@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
585 ret = PS3AV_CMD_AV_INPUTLEN_24; 583 ret = PS3AV_CMD_AV_INPUTLEN_24;
586 break; 584 break;
587 default: 585 default:
588 printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__, 586 printk(KERN_ERR "%s failed, word_bits:%x\n", __func__,
589 word_bits); 587 word_bits);
590 break; 588 break;
591 } 589 }
@@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
595static u8 ps3av_cnv_layout(u32 num_of_ch) 593static u8 ps3av_cnv_layout(u32 num_of_ch)
596{ 594{
597 if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) { 595 if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) {
598 printk(KERN_ERR "%s failed, num_of_ch:%x\n", __FUNCTION__, 596 printk(KERN_ERR "%s failed, num_of_ch:%x\n", __func__,
599 num_of_ch); 597 num_of_ch);
600 return 0; 598 return 0;
601 } 599 }
@@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len)
864 862
865 res = get_status(avb); 863 res = get_status(avb);
866 if (res) 864 if (res)
867 pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __FUNCTION__, 865 pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __func__,
868 res); 866 res);
869 867
870 out: 868 out:
@@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
1013 return size; 1011 return size;
1014 if (error != -EAGAIN) { 1012 if (error != -EAGAIN) {
1015 printk(KERN_ERR "%s: ps3_vuart_read failed %d\n", 1013 printk(KERN_ERR "%s: ps3_vuart_read failed %d\n",
1016 __FUNCTION__, error); 1014 __func__, error);
1017 return error; 1015 return error;
1018 } 1016 }
1019 msleep(POLLING_INTERVAL); 1017 msleep(POLLING_INTERVAL);