aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ps3
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-03-14 05:19:30 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-14 18:27:50 -0400
commitdfdcbcc426616811f069b741394ba8771dc58527 (patch)
treea48708bd03762018e56e92caa2d357330118452a /drivers/ps3
parent23f28001f7858f0cbbcc8cc39d7a0a1346ed68e2 (diff)
[PATCH] C99 initializers, proper use of const in drivers/ps3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-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_cmd.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/ps3/ps3av_cmd.c b/drivers/ps3/ps3av_cmd.c
index 21c97c80aa2e..bc70e81f8cb0 100644
--- a/drivers/ps3/ps3av_cmd.c
+++ b/drivers/ps3/ps3av_cmd.c
@@ -485,12 +485,12 @@ static u8 ps3av_cnv_mclk(u32 fs)
485 485
486static const u32 ps3av_ns_table[][5] = { 486static const u32 ps3av_ns_table[][5] = {
487 /* D1, D2, D3, D4, D5 */ 487 /* D1, D2, D3, D4, D5 */
488 [PS3AV_CMD_AUDIO_FS_44K-BASE] { 6272, 6272, 17836, 17836, 8918 }, 488 [PS3AV_CMD_AUDIO_FS_44K-BASE] = { 6272, 6272, 17836, 17836, 8918 },
489 [PS3AV_CMD_AUDIO_FS_48K-BASE] { 6144, 6144, 11648, 11648, 5824 }, 489 [PS3AV_CMD_AUDIO_FS_48K-BASE] = { 6144, 6144, 11648, 11648, 5824 },
490 [PS3AV_CMD_AUDIO_FS_88K-BASE] { 12544, 12544, 35672, 35672, 17836 }, 490 [PS3AV_CMD_AUDIO_FS_88K-BASE] = { 12544, 12544, 35672, 35672, 17836 },
491 [PS3AV_CMD_AUDIO_FS_96K-BASE] { 12288, 12288, 23296, 23296, 11648 }, 491 [PS3AV_CMD_AUDIO_FS_96K-BASE] = { 12288, 12288, 23296, 23296, 11648 },
492 [PS3AV_CMD_AUDIO_FS_176K-BASE] { 25088, 25088, 71344, 71344, 35672 }, 492 [PS3AV_CMD_AUDIO_FS_176K-BASE] = { 25088, 25088, 71344, 71344, 35672 },
493 [PS3AV_CMD_AUDIO_FS_192K-BASE] { 24576, 24576, 46592, 46592, 23296 } 493 [PS3AV_CMD_AUDIO_FS_192K-BASE] = { 24576, 24576, 46592, 46592, 23296 }
494}; 494};
495 495
496static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid) 496static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
@@ -543,9 +543,10 @@ static void ps3av_cnv_ns(u8 *ns, u32 fs, u32 video_vid)
543 543
544#undef BASE 544#undef BASE
545 545
546static u8 ps3av_cnv_enable(u32 source, u8 *enable) 546static u8 ps3av_cnv_enable(u32 source, const u8 *enable)
547{ 547{
548 u8 *p, ret = 0; 548 const u8 *p;
549 u8 ret = 0;
549 550
550 if (source == PS3AV_CMD_AUDIO_SOURCE_SPDIF) { 551 if (source == PS3AV_CMD_AUDIO_SOURCE_SPDIF) {
551 ret = 0x03; 552 ret = 0x03;
@@ -559,9 +560,10 @@ static u8 ps3av_cnv_enable(u32 source, u8 *enable)
559 return ret; 560 return ret;
560} 561}
561 562
562static u8 ps3av_cnv_fifomap(u8 *map) 563static u8 ps3av_cnv_fifomap(const u8 *map)
563{ 564{
564 u8 *p, ret = 0; 565 const u8 *p;
566 u8 ret = 0;
565 567
566 p = map; 568 p = map;
567 ret = p[0] + (p[1] << 2) + (p[2] << 4) + (p[3] << 6); 569 ret = p[0] + (p[1] << 2) + (p[2] << 4) + (p[3] << 6);
@@ -615,7 +617,7 @@ static void ps3av_cnv_info(struct ps3av_audio_info_frame *info,
615 info->pb5.lsv = mode->audio_downmix_level; 617 info->pb5.lsv = mode->audio_downmix_level;
616} 618}
617 619
618static void ps3av_cnv_chstat(u8 *chstat, u8 *cs_info) 620static void ps3av_cnv_chstat(u8 *chstat, const u8 *cs_info)
619{ 621{
620 memcpy(chstat, cs_info, 5); 622 memcpy(chstat, cs_info, 5);
621} 623}