diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-05-02 14:48:38 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 17:59:09 -0700 |
commit | 253f04e78ded827c30f9582489773ebe2adc8924 (patch) | |
tree | 931a7b5999fb382ce6e906442f884cdf2a873b7f /drivers/ps3 | |
parent | d778c9a400e569029c8a48bc898c70780d6d2c1c (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')
-rw-r--r-- | drivers/ps3/ps3av.c | 42 | ||||
-rw-r--r-- | drivers/ps3/ps3av_cmd.c | 20 |
2 files changed, 29 insertions, 33 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) else printk(KERN_ERR "%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 0; @@ -198,7 +198,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, if (res < 0) { dev_dbg(&ps3av_dev.core, "%s: ps3av_vuart_write() failed (result=%d)\n", - __FUNCTION__, res); + __func__, res); return res; } @@ -211,7 +211,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, if (res != PS3AV_HDR_SIZE) { dev_dbg(&ps3av_dev.core, "%s: ps3av_vuart_read() failed (result=%d)\n", - __FUNCTION__, res); + __func__, res); return res; } @@ -221,7 +221,7 @@ static int ps3av_send_cmd_pkt(const struct ps3av_send_hdr *send_buf, if (res < 0) { dev_dbg(&ps3av_dev.core, "%s: ps3av_vuart_read() failed (result=%d)\n", - __FUNCTION__, res); + __func__, res); return res; } res += PS3AV_HDR_SIZE; /* total len */ @@ -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) { dev_dbg(&ps3av_dev.core, "%s: reply err (result=%x)\n", - __FUNCTION__, recv_buf->cid); + __func__, recv_buf->cid); return -EINVAL; } @@ -293,7 +293,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, if (res < 0) { printk(KERN_ERR "%s: ps3av_send_cmd_pkt() failed (result=%d)\n", - __FUNCTION__, res); + __func__, res); goto err; } @@ -302,7 +302,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, usr_buf_size); if (res < 0) { printk(KERN_ERR "%s: put_return_status() failed (result=%d)\n", - __FUNCTION__, res); + __func__, res); goto err; } @@ -311,7 +311,7 @@ int ps3av_do_pkt(u32 cid, u16 send_len, size_t usr_buf_size, err: 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; } @@ -522,7 +522,7 @@ static void ps3av_set_videomode_cont(u32 id, u32 old_id) if (res == PS3AV_STATUS_NO_SYNC_HEAD) printk(KERN_WARNING "%s: Command failed. Please try your request again. \n", - __FUNCTION__); + __func__); else if (res) dev_dbg(&ps3av_dev.core, "ps3av_cmd_avb_param failed\n"); @@ -715,8 +715,7 @@ int ps3av_set_video_mode(u32 id, int boot) size = ARRAY_SIZE(video_mode_table); if ((id & PS3AV_MODE_MASK) > size - 1 || id < 0) { - dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __FUNCTION__, - id); + dev_dbg(&ps3av_dev.core, "%s: error id :%d\n", __func__, id); return -EINVAL; } @@ -725,8 +724,7 @@ int ps3av_set_video_mode(u32 id, int boot) if ((id & PS3AV_MODE_MASK) == 0) { id = ps3av_auto_videomode(&ps3av.av_hw_conf, boot); if (id < 1) { - printk(KERN_ERR "%s: invalid id :%d\n", __FUNCTION__, - id); + printk(KERN_ERR "%s: invalid id :%d\n", __func__, id); return -EINVAL; } id |= option; @@ -786,7 +784,7 @@ int ps3av_get_scanmode(int id) id = id & PS3AV_MODE_MASK; size = ARRAY_SIZE(video_mode_table); 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 video_mode_table[id].interlace; @@ -801,7 +799,7 @@ int ps3av_get_refresh_rate(int id) id = id & PS3AV_MODE_MASK; size = ARRAY_SIZE(video_mode_table); 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 video_mode_table[id].freq; @@ -817,7 +815,7 @@ int ps3av_video_mode2res(u32 id, u32 *xres, u32 *yres) id = id & PS3AV_MODE_MASK; size = ARRAY_SIZE(video_mode_table); 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; } *xres = video_mode_table[id].x; @@ -853,7 +851,7 @@ int ps3av_dev_open(void) status = lv1_gpu_open(0); if (status) { printk(KERN_ERR "%s: lv1_gpu_open failed %d\n", - __FUNCTION__, status); + __func__, status); ps3av.open_count--; } } @@ -870,13 +868,13 @@ int ps3av_dev_close(void) mutex_lock(&ps3av.mutex); 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; } else if (!--ps3av.open_count) { status = lv1_gpu_close(); if (status) printk(KERN_WARNING "%s: lv1_gpu_close failed %d\n", - __FUNCTION__, status); + __func__, status); } mutex_unlock(&ps3av.mutex); @@ -926,7 +924,7 @@ static int ps3av_probe(struct ps3_vuart_port_device *dev) /* init avsetting modules */ res = ps3av_cmd_init(); 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); ps3av_get_hw_conf(&ps3av); @@ -978,7 +976,7 @@ static int ps3av_module_init(void) if (error) { printk(KERN_ERR "%s: ps3_vuart_port_driver_register failed %d\n", - __FUNCTION__, error); + __func__, error); return error; } @@ -986,7 +984,7 @@ static int ps3av_module_init(void) if (error) printk(KERN_ERR "%s: ps3_vuart_port_device_register failed %d\n", - __FUNCTION__, error); + __func__, error); return error; } 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, 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", - __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->video_format, video_mode->video_order); return sizeof(*video_mode); @@ -477,7 +477,7 @@ static u8 ps3av_cnv_mclk(u32 fs) if (ps3av_cnv_mclk_table[i].fs == fs) 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; } @@ -526,13 +526,12 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid) d = 4; break; default: - printk(KERN_ERR "%s failed, vid:%x\n", __FUNCTION__, - video_vid); + printk(KERN_ERR "%s failed, vid:%x\n", __func__, video_vid); break; } 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 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) ret = ((p[0] << 4) + (p[1] << 5) + (p[2] << 6) + (p[3] << 7)) | 0x01; } else - printk(KERN_ERR "%s failed, source:%x\n", __FUNCTION__, - source); + printk(KERN_ERR "%s failed, source:%x\n", __func__, source); return ret; } @@ -585,7 +583,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits) ret = PS3AV_CMD_AV_INPUTLEN_24; break; default: - printk(KERN_ERR "%s failed, word_bits:%x\n", __FUNCTION__, + printk(KERN_ERR "%s failed, word_bits:%x\n", __func__, word_bits); break; } @@ -595,7 +593,7 @@ static u8 ps3av_cnv_inputlen(u32 word_bits) static u8 ps3av_cnv_layout(u32 num_of_ch) { 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); return 0; } @@ -864,7 +862,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *avb, u32 send_len) res = get_status(avb); 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); out: @@ -1013,7 +1011,7 @@ int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, return size; if (error != -EAGAIN) { printk(KERN_ERR "%s: ps3_vuart_read failed %d\n", - __FUNCTION__, error); + __func__, error); return error; } msleep(POLLING_INTERVAL); |