Commit 253f04e7 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

ps3av: Use __func__ instead of __FUNCTION__

ps3av: Replace GNU extension `__FUNCTION__' by C99 `__func__'
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d778c9a4
...@@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr) ...@@ -176,7 +176,7 @@ static int ps3av_parse_event_packet(const struct ps3av_reply_hdr *hdr)
else else
printk(KERN_ERR printk(KERN_ERR
"%s: failed event packet, cid:%08x size:%d\n", "%s: failed event packet, cid:%08x size:%d\n",
__FUNCTION__, hdr->cid, hdr->size); __func__, hdr->cid, hdr->size);
return 1; /* receive event packet */ return 1; /* receive event packet */
} }
return 0; return 0;
...@@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, ...@@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res < 0) { if (res < 0) {
dev_dbg(&ps3av_dev.core, dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_write() failed (result=%d)\n", "%s: ps3av_vuart_write() failed (result=%d)\n",
__FUNCTION__, res); __func__, res);
return res; return res;
} }
...@@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, ...@@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res != PS3AV_HDR_SIZE) { if (res != PS3AV_HDR_SIZE) {
dev_dbg(&ps3av_dev.core, dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n", "%s: ps3av_vuart_read() failed (result=%d)\n",
__FUNCTION__, res); __func__, res);
return res; return res;
} }
...@@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, ...@@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if (res < 0) { if (res < 0) {
dev_dbg(&ps3av_dev.core, dev_dbg(&ps3av_dev.core,
"%s: ps3av_vuart_read() failed (result=%d)\n", "%s: ps3av_vuart_read() failed (result=%d)\n",
__FUNCTION__, res); __func__, res);
return res; return res;
} }
res += PS3AV_HDR_SIZE; /* total len */ res += PS3AV_HDR_SIZE; /* total len */
...@@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, ...@@ -231,7 +231,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf,
if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) { if ((cmd | PS3AV_REPLY_BIT) != recv_buf->cid) {
dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n", dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n",
__FUNCTION__, recv_buf->cid); __func__, recv_buf->cid);
return -EINVAL; return -EINVAL;
} }
...@@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, ...@@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
if (res < 0) { if (res < 0) {
printk(KERN_ERR printk(KERN_ERR
"%s: ps3av_send_cmd_pkt() failed (result=%d)\n", "%s: ps3av_send_cmd_pkt() failed (result=%d)\n",
__FUNCTION__, res); __func__, res);
goto err; goto err;
} }
...@@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, ...@@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
usr_buf_size); usr_buf_size);
if (res < 0) { if (res < 0) {
printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n", printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n",
__FUNCTION__, res); __func__, res);
goto err; goto err;
} }
...@@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, ...@@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size,
err: err:
mutex_unlock(&ps3av.mutex); mutex_unlock(&ps3av.mutex);
printk(KERN_ERR "%s: failed cid:%x res:%d\n", __FUNCTION__, cid, res); printk(KERN_ERR "%s: failed cid:%x res:%d\n", __func__, cid, res);
return res; return res;
} }
...@@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id) ...@@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id)
if (res == PS3AV_STATUS_NO_SYNC_HEAD) if (res == PS3AV_STATUS_NO_SYNC_HEAD)
printk(KERN_WARNING printk(KERN_WARNING
"%s: Command failed. Please try your request again. \n", "%s: Command failed. Please try your request again. \n",
__FUNCTION__); __func__);
else if (res) else if (res)
dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n"); dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n");
...@@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot) ...@@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot)
size = ARRAY_SIZE(video_mode_table); size = ARRAY_SIZE(video_mode_table);
if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) { if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) {
dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__, dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id);
id);
return -EINVAL; return -EINVAL;
} }
...@@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot) ...@@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot)
if ((id & PS3AV_MODE_MASK) == 0) { if ((id & PS3AV_MODE_MASK) == 0) {
id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot); id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
if (id < 1) { if (id < 1) {
printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__, printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
id);
return -EINVAL; return -EINVAL;
} }
id |= option; id |= option;
...@@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id) ...@@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id)
id = id & PS3AV_MODE_MASK; id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table); size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) { if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL; return -EINVAL;
} }
return video_mode_table[id].interlace; return video_mode_table[id].interlace;
...@@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id) ...@@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id)
id = id & PS3AV_MODE_MASK; id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table); size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) { if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL; return -EINVAL;
} }
return video_mode_table[id].freq; return video_mode_table[id].freq;
...@@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres) ...@@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres)
id = id & PS3AV_MODE_MASK; id = id & PS3AV_MODE_MASK;
size = ARRAY_SIZE(video_mode_table); size = ARRAY_SIZE(video_mode_table);
if (id > size - 1 || id < 0) { if (id > size - 1 || id < 0) {
printk(KERN_ERR "%s: invalid mode %d\n", __FUNCTION__, id); printk(KERN_ERR "%s: invalid mode %d\n", __func__, id);
return -EINVAL; return -EINVAL;
} }
*xres = video_mode_table[id].x; *xres = video_mode_table[id].x;
...@@ -853,7 +851,7 @@ int ps3av_dev_open(void) ...@@ -853,7 +851,7 @@ int ps3av_dev_open(void)
status = lv1_gpu_open(0); status = lv1_gpu_open(0);
if (status) { if (status) {
printk(KERN_ERR "%s: lv1_gpu_open failed %d\n", printk(KERN_ERR "%s: lv1_gpu_open failed %d\n",
__FUNCTION__, status); __func__, status);
ps3av.open_count--; ps3av.open_count--;
} }
} }
...@@ -870,13 +868,13 @@ int ps3av_dev_close(void) ...@@ -870,13 +868,13 @@ int ps3av_dev_close(void)
mutex_lock(&ps3av.mutex); mutex_lock(&ps3av.mutex);
if (ps3av.open_count <= 0) { if (ps3av.open_count <= 0) {
printk(KERN_ERR "%s: GPU already closed\n", __FUNCTION__); printk(KERN_ERR "%s: GPU already closed\n", __func__);
status = -1; status = -1;
} else if (!--ps3av.open_count) { } else if (!--ps3av.open_count) {
status = lv1_gpu_close(); status = lv1_gpu_close();
if (status) if (status)
printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n", printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n",
__FUNCTION__, status); __func__, status);
} }
mutex_unlock(&ps3av.mutex); mutex_unlock(&ps3av.mutex);
...@@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev) ...@@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev)
/* init avsetting modules */ /* init avsetting modules */
res = ps3av_cmd_init(); res = ps3av_cmd_init();
if (res < 0) if (res < 0)
printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __FUNCTION__, printk(KERN_ERR "%s: ps3av_cmd_init failed %d\n", __func__,
res); res);
ps3av_get_hw_conf(&ps3av); ps3av_get_hw_conf(&ps3av);
...@@ -978,7 +976,7 @@ static int ps3av_module_init(void) ...@@ -978,7 +976,7 @@ static int ps3av_module_init(void)
if (error) { if (error) {
printk(KERN_ERR printk(KERN_ERR
"%s: ps3_vuart_port_driver_register failed %d\n", "%s: ps3_vuart_port_driver_register failed %d\n",
__FUNCTION__, error); __func__, error);
return error; return error;
} }
...@@ -986,7 +984,7 @@ static int ps3av_module_init(void) ...@@ -986,7 +984,7 @@ static int ps3av_module_init(void)
if (error) if (error)
printk(KERN_ERR printk(KERN_ERR
"%s: ps3_vuart_port_device_register failed %d\n", "%s: ps3_vuart_port_device_register failed %d\n",
__FUNCTION__, error); __func__, error);
return error; return error;
} }
......
...@@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u32 head, int video_vid, int video_fmt, ...@@ -395,7 +395,7 @@ u32 ps3av_cmd_set_video_mode(void *p, u32 head, int video_vid, int video_fmt,
video_mode->video_order = ps3av_video_fmt_table[video_fmt].order; video_mode->video_order = ps3av_video_fmt_table[video_fmt].order;
pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n", pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
__FUNCTION__, video_vid, video_mode->width, video_mode->height, __func__, video_vid, video_mode->width, video_mode->height,
video_mode->pitch, video_mode->video_out_format, video_mode->pitch, video_mode->video_out_format,
video_mode->video_format, video_mode->video_order); video_mode->video_format, video_mode->video_order);
return sizeof(*video_mode); return sizeof(*video_mode);
...@@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs) ...@@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs)
if (ps3av_cnv_mclk_table[i].fs == fs) if (ps3av_cnv_mclk_table[i].fs == fs)
return ps3av_cnv_mclk_table[i].mclk; return ps3av_cnv_mclk_table[i].mclk;
printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
return 0; return 0;
} }
...@@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid) ...@@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
d = 4; d = 4;
break; break;
default: default:
printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__, printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid);
video_vid);
break; break;
} }
if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K) if (fs < PS3AV_CMD_AUDIO_FS_44K || fs > PS3AV_CMD_AUDIO_FS_192K)
printk(KERN_ERR "%s failed, fs:%x\n", __FUNCTION__, fs); printk(KERN_ERR "%s failed, fs:%x\n", __func__, fs);
else else
ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d]; ns_val = ps3av_ns_table[PS3AV_CMD_AUDIO_FS_44K-BASE][d];
...@@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, const u8 *enable) ...@@ -555,8 +554,7 @@ static u8 ps3av_cnv_enable(u32 source, const u8 *enable)
ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) | ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) |
0x01; 0x01;
} else } else
printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__, printk(KERN_ERR "%s failed, source:%x\n", __func__, source);
source);
return ret; return ret;
} }
...@@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits) ...@@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
ret = PS3AV_CMD_AV_INPUTLEN_24; ret = PS3AV_CMD_AV_INPUTLEN_24;
break; break;
default: default:
printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__, printk(KERN_ERR "%s failed, word_bits:%x\n", __func__,
word_bits); word_bits);
break; break;
} }
...@@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits) ...@@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits)
static u8 ps3av_cnv_layout(u32 num_of_ch) static u8 ps3av_cnv_layout(u32 num_of_ch)
{ {
if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) { if (num_of_ch > PS3AV_CMD_AUDIO_NUM_OF_CH_8) {
printk(KERN_ERR "%s failed, num_of_ch:%x\n", __FUNCTION__, printk(KERN_ERR "%s failed, num_of_ch:%x\n", __func__,
num_of_ch); num_of_ch);
return 0; return 0;
} }
...@@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len) ...@@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len)
res = get_status(avb); res = get_status(avb);
if (res) if (res)
pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __FUNCTION__, pr_debug("%s: PS3AV_CID_AVB_PARAM: failed %x\n", __func__,
res); res);
out: out:
...@@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, ...@@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
return size; return size;
if (error != -EAGAIN) { if (error != -EAGAIN) {
printk(KERN_ERR "%s: ps3_vuart_read failed %d\n", printk(KERN_ERR "%s: ps3_vuart_read failed %d\n",
__FUNCTION__, error); __func__, error);
return error; return error;
} }
msleep(POLLING_INTERVAL); msleep(POLLING_INTERVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment