aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ps3/ps3av.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2007-05-02 08:48:38 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 20:59:09 -0400
commit253f04e78ded827c30f9582489773ebe2adc8924 (patch)
tree931a7b5999fb382ce6e906442f884cdf2a873b7f /drivers/ps3/ps3av.c
parentd778c9a400e569029c8a48bc898c70780d6d2c1c (diff)
ps3av: Use __func__ instead of __FUNCTION__
ps3av: Replace GNU extension `__FUNCTION__' by C99 `__func__' Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ps3/ps3av.c')
-rw-r--r--drivers/ps3/ps3av.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 5a418b1b1659..1393e64335f9 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr)
176 else 176 else
177 printk(KERN_ERR 177 printk(KERN_ERR
178 "%s: failed event packet, cid:%08x size:%d\n", 178 "%s: failed event packet, cid:%08x size:%d\n",
179 __FUNCTION__, hdr->cid, hdr->size); 179 __func__, hdr->cid, hdr->size);
180 return 1; /* receive event packet */ 180 return 1; /* receive event packet */
181 } 181 }
182 return 0; 182 return 0;
@@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
198 if (res < 0) { 198 if (res < 0) {
199 dev_dbg(&ps3av_dev.core, 199 dev_dbg(&ps3av_dev.core,
200 "%s: ps3av_vuart_write() failed (result=%d)\n", 200 "%s: ps3av_vuart_write() failed (result=%d)\n",
201 __FUNCTION__, res); 201 __func__, res);
202 return res; 202 return res;
203 } 203 }
204 204
@@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
211 if (res != PS3AV_HDR_SIZE) { 211 if (res != PS3AV_HDR_SIZE) {
212 dev_dbg(&ps3av_dev.core, 212 dev_dbg(&ps3av_dev.core,
213 "%s: ps3av_vuart_read() failed (result=%d)\n", 213 "%s: ps3av_vuart_read() failed (result=%d)\n",
214 __FUNCTION__, res); 214 __func__, res);
215 return res; 215 return res;
216 } 216 }
217 217
@@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
221 if (res < 0) { 221 if (res < 0) {
222 dev_dbg(&ps3av_dev.core, 222 dev_dbg(&ps3av_dev.core,
223 "%s: ps3av_vuart_read() failed (result=%d)\n", 223 "%s: ps3av_vuart_read() failed (result=%d)\n",
224 __FUNCTION__, res); 224 __func__, res);
225 return res; 225 return res;
226 } 226 }
227 res += PS3AV_HDR_SIZE; /* total len */ 227 res += PS3AV_HDR_SIZE; /* total len */
@@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
231 231
232 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) { 232 if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
233 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n", 233 dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
234 __FUNCTION__, recv_buf->cid); 234 __func__, recv_buf->cid);
235 return -EINVAL; 235 return -EINVAL;
236 } 236 }
237 237
@@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
293 if (res < 0) { 293 if (res < 0) {
294 printk(KERN_ERR 294 printk(KERN_ERR
295 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n", 295 "%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
296 __FUNCTION__, res); 296 __func__, res);
297 goto err; 297 goto err;
298 } 298 }
299 299
@@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
302 usr_buf_size); 302 usr_buf_size);
303 if (res < 0) { 303 if (res < 0) {
304 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n", 304 printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
305 __FUNCTION__, res); 305 __func__, res);
306 goto err; 306 goto err;
307 } 307 }
308 308
@@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
311 311
312 err: 312 err:
313 mutex_unlock(&ps3av.mutex); 313 mutex_unlock(&ps3av.mutex);
314 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);
315 return res; 315 return res;
316} 316}
317 317
@@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
522 if (res == PS3AV_STATUS_NO_SYNC_HEAD) 522 if (res == PS3AV_STATUS_NO_SYNC_HEAD)
523 printk(KERN_WARNING 523 printk(KERN_WARNING
524 "%s: Command failed. Please try your request again. \n", 524 "%s: Command failed. Please try your request again. \n",
525 __FUNCTION__); 525 __func__);
526 else if (res) 526 else if (res)
527 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n"); 527 dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");
528 528
@@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot)
715 715
716 size = ARRAY_SIZE(video_mode_table); 716 size = ARRAY_SIZE(video_mode_table);
717 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) { 717 if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
718 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__, 718 dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
719 id);
720 return -EINVAL; 719 return -EINVAL;
721 } 720 }
722 721
@@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot)
725 if ((id & PS3AV_MODE_MASK) == 0) { 724 if ((id & PS3AV_MODE_MASK) == 0) {
726 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot); 725 id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
727 if (id < 1) { 726 if (id < 1) {
728 printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__, 727 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
729 id);
730 return -EINVAL; 728 return -EINVAL;
731 } 729 }
732 id |= option; 730 id |= option;
@@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id)
786 id = id & PS3AV_MODE_MASK; 784 id = id & PS3AV_MODE_MASK;
787 size = ARRAY_SIZE(video_mode_table); 785 size = ARRAY_SIZE(video_mode_table);
788 if (id > size - 1 || id < 0) { 786 if (id > size - 1 || id < 0) {
789 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 787 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
790 return -EINVAL; 788 return -EINVAL;
791 } 789 }
792 return video_mode_table[id].interlace; 790 return video_mode_table[id].interlace;
@@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
801 id = id & PS3AV_MODE_MASK; 799 id = id & PS3AV_MODE_MASK;
802 size = ARRAY_SIZE(video_mode_table); 800 size = ARRAY_SIZE(video_mode_table);
803 if (id > size - 1 || id < 0) { 801 if (id > size - 1 || id < 0) {
804 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 802 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
805 return -EINVAL; 803 return -EINVAL;
806 } 804 }
807 return video_mode_table[id].freq; 805 return video_mode_table[id].freq;
@@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
817 id = id & PS3AV_MODE_MASK; 815 id = id & PS3AV_MODE_MASK;
818 size = ARRAY_SIZE(video_mode_table); 816 size = ARRAY_SIZE(video_mode_table);
819 if (id > size - 1 || id < 0) { 817 if (id > size - 1 || id < 0) {
820 printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); 818 printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
821 return -EINVAL; 819 return -EINVAL;
822 } 820 }
823 *xres = video_mode_table[id].x; 821 *xres = video_mode_table[id].x;
@@ -853,7 +851,7 @@ int ps3av_dev_open(void)
853 status = lv1_gpu_open(0); 851 status = lv1_gpu_open(0);
854 if (status) { 852 if (status) {
855 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n", 853 printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
856 __FUNCTION__, status); 854 __func__, status);
857 ps3av.open_count--; 855 ps3av.open_count--;
858 } 856 }
859 } 857 }
@@ -870,13 +868,13 @@ int ps3av_dev_close(void)
870 868
871 mutex_lock(&ps3av.mutex); 869 mutex_lock(&ps3av.mutex);
872 if (ps3av.open_count <= 0) { 870 if (ps3av.open_count <= 0) {
873 printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__); 871 printk(KERN_ERR "%s: GPU already closed\n", __func__);
874 status = -1; 872 status = -1;
875 } else if (!--ps3av.open_count) { 873 } else if (!--ps3av.open_count) {
876 status = lv1_gpu_close(); 874 status = lv1_gpu_close();
877 if (status) 875 if (status)
878 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n", 876 printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
879 __FUNCTION__, status); 877 __func__, status);
880 } 878 }
881 mutex_unlock(&ps3av.mutex); 879 mutex_unlock(&ps3av.mutex);
882 880
@@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
926 /* init avsetting modules */ 924 /* init avsetting modules */
927 res = ps3av_cmd_init(); 925 res = ps3av_cmd_init();
928 if (res < 0) 926 if (res < 0)
929 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__, 927 printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
930 res); 928 res);
931 929
932 ps3av_get_hw_conf(&ps3av); 930 ps3av_get_hw_conf(&ps3av);
@@ -978,7 +976,7 @@ static int ps3av_module_init(void)
978 if (error) { 976 if (error) {
979 printk(KERN_ERR 977 printk(KERN_ERR
980 "%s: ps3_vuart_port_driver_register failed %d\n", 978 "%s: ps3_vuart_port_driver_register failed %d\n",
981 __FUNCTION__, error); 979 __func__, error);
982 return error; 980 return error;
983 } 981 }
984 982
@@ -986,7 +984,7 @@ static int ps3av_module_init(void)
986 if (error) 984 if (error)
987 printk(KERN_ERR 985 printk(KERN_ERR
988 "%s: ps3_vuart_port_device_register failed %d\n", 986 "%s: ps3_vuart_port_device_register failed %d\n",
989 __FUNCTION__, error); 987 __func__, error);
990 988
991 return error; 989 return error;
992} 990}