diff options
author | Sigmund Augdal Helberg <sigmund@snap.tv> | 2006-06-21 09:28:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:18 -0400 |
commit | 6cd94745fb3b97fb6ecd730c0aa9d1fb4fdf9c10 (patch) | |
tree | 90fdce0529efb508f6ba5c7bc5066c9b6bf7f6f7 | |
parent | 5aef20aeff7e9b0741ecc80365a3f7416900e494 (diff) |
V4L/DVB (4172): Remove spurious newlines in dprintk's. Add dst(card-num) as prefix in dprintk
Signed-off-by: Sigmund Augdal Helberg <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 35d25c04e5c5..d7d3d06aa4a9 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -51,20 +51,20 @@ MODULE_PARM_DESC(dst_algo, "tuning algo: default is 0=(SW), 1=(HW)"); | |||
51 | #define DST_INFO 2 | 51 | #define DST_INFO 2 |
52 | #define DST_DEBUG 3 | 52 | #define DST_DEBUG 3 |
53 | 53 | ||
54 | #define dprintk(x, y, z, format, arg...) do { \ | 54 | #define dprintk(x, y, z, format, arg...) do { \ |
55 | if (z) { \ | 55 | if (z) { \ |
56 | if ((x > DST_ERROR) && (x > y)) \ | 56 | if ((x > DST_ERROR) && (x > y)) \ |
57 | printk(KERN_ERR "%s: " format "\n", __FUNCTION__ , ##arg); \ | 57 | printk(KERN_ERR "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \ |
58 | else if ((x > DST_NOTICE) && (x > y)) \ | 58 | else if ((x > DST_NOTICE) && (x > y)) \ |
59 | printk(KERN_NOTICE "%s: " format "\n", __FUNCTION__ , ##arg); \ | 59 | printk(KERN_NOTICE "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \ |
60 | else if ((x > DST_INFO) && (x > y)) \ | 60 | else if ((x > DST_INFO) && (x > y)) \ |
61 | printk(KERN_INFO "%s: " format "\n", __FUNCTION__ , ##arg); \ | 61 | printk(KERN_INFO "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \ |
62 | else if ((x > DST_DEBUG) && (x > y)) \ | 62 | else if ((x > DST_DEBUG) && (x > y)) \ |
63 | printk(KERN_DEBUG "%s: " format "\n", __FUNCTION__ , ##arg); \ | 63 | printk(KERN_DEBUG "dst(%d) %s: " format "\n",state->bt->nr, __FUNCTION__ , ##arg); \ |
64 | } else { \ | 64 | } else { \ |
65 | if (x > y) \ | 65 | if (x > y) \ |
66 | printk(format, ##arg); \ | 66 | printk(format, ##arg); \ |
67 | } \ | 67 | } \ |
68 | } while(0) | 68 | } while(0) |
69 | 69 | ||
70 | 70 | ||
@@ -114,7 +114,7 @@ int dst_gpio_inb(struct dst_state *state, u8 *result) | |||
114 | 114 | ||
115 | *result = 0; | 115 | *result = 0; |
116 | if ((err = bt878_device_control(state->bt, DST_IG_READ, &rd_packet)) < 0) { | 116 | if ((err = bt878_device_control(state->bt, DST_IG_READ, &rd_packet)) < 0) { |
117 | dprintk(verbose, DST_ERROR, 1, "dst_gpio_inb error (err == %i)\n", err); | 117 | dprintk(verbose, DST_ERROR, 1, "dst_gpio_inb error (err == %i)", err); |
118 | return -EREMOTEIO; | 118 | return -EREMOTEIO; |
119 | } | 119 | } |
120 | *result = (u8) rd_packet.rd.value; | 120 | *result = (u8) rd_packet.rd.value; |
@@ -538,8 +538,10 @@ u8 dst_check_sum(u8 *buf, u32 len) | |||
538 | } | 538 | } |
539 | EXPORT_SYMBOL(dst_check_sum); | 539 | EXPORT_SYMBOL(dst_check_sum); |
540 | 540 | ||
541 | static void dst_type_flags_print(u32 type_flags) | 541 | static void dst_type_flags_print(struct dst_state *state) |
542 | { | 542 | { |
543 | u32 type_flags = state->type_flags; | ||
544 | |||
543 | dprintk(verbose, DST_ERROR, 0, "DST type flags :"); | 545 | dprintk(verbose, DST_ERROR, 0, "DST type flags :"); |
544 | if (type_flags & DST_TYPE_HAS_NEWTUNE) | 546 | if (type_flags & DST_TYPE_HAS_NEWTUNE) |
545 | dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner", DST_TYPE_HAS_NEWTUNE); | 547 | dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner", DST_TYPE_HAS_NEWTUNE); |
@@ -559,7 +561,7 @@ static void dst_type_flags_print(u32 type_flags) | |||
559 | } | 561 | } |
560 | 562 | ||
561 | 563 | ||
562 | static int dst_type_print(u8 type) | 564 | static int dst_type_print(struct dst_state *state, u8 type) |
563 | { | 565 | { |
564 | char *otype; | 566 | char *otype; |
565 | switch (type) { | 567 | switch (type) { |
@@ -933,7 +935,7 @@ static int dst_card_type(struct dst_state *state) | |||
933 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { | 935 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { |
934 | if (!strcmp(&state->card_info[0], p_tuner_list->board_name)) { | 936 | if (!strcmp(&state->card_info[0], p_tuner_list->board_name)) { |
935 | state->tuner_type = p_tuner_list->tuner_type; | 937 | state->tuner_type = p_tuner_list->tuner_type; |
936 | dprintk(verbose, DST_ERROR, 1, "DST has [%s] tuner, tuner type=[%d]\n", | 938 | dprintk(verbose, DST_ERROR, 1, "DST has [%s] tuner, tuner type=[%d]", |
937 | p_tuner_list->tuner_name, p_tuner_list->tuner_type); | 939 | p_tuner_list->tuner_name, p_tuner_list->tuner_type); |
938 | } | 940 | } |
939 | } | 941 | } |
@@ -1039,7 +1041,7 @@ static int dst_get_device_id(struct dst_state *state) | |||
1039 | 1041 | ||
1040 | /* Card capabilities */ | 1042 | /* Card capabilities */ |
1041 | state->dst_hw_cap = p_dst_type->dst_feature; | 1043 | state->dst_hw_cap = p_dst_type->dst_feature; |
1042 | dprintk(verbose, DST_ERROR, 1, "Recognise [%s]\n", p_dst_type->device_id); | 1044 | dprintk(verbose, DST_ERROR, 1, "Recognise [%s]", p_dst_type->device_id); |
1043 | 1045 | ||
1044 | if (p_dst_type->tuner_type != TUNER_TYPE_MULTI) { | 1046 | if (p_dst_type->tuner_type != TUNER_TYPE_MULTI) { |
1045 | state->tuner_type = p_dst_type->tuner_type; | 1047 | state->tuner_type = p_dst_type->tuner_type; |
@@ -1047,7 +1049,7 @@ static int dst_get_device_id(struct dst_state *state) | |||
1047 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { | 1049 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { |
1048 | if (p_dst_type->tuner_type == p_tuner_list->tuner_type) { | 1050 | if (p_dst_type->tuner_type == p_tuner_list->tuner_type) { |
1049 | state->tuner_type = p_tuner_list->tuner_type; | 1051 | state->tuner_type = p_tuner_list->tuner_type; |
1050 | dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner\n", p_tuner_list->tuner_name); | 1052 | dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner", p_tuner_list->tuner_name); |
1051 | } | 1053 | } |
1052 | } | 1054 | } |
1053 | } | 1055 | } |
@@ -1061,10 +1063,10 @@ static int dst_get_device_id(struct dst_state *state) | |||
1061 | use_dst_type = DST_TYPE_IS_SAT; | 1063 | use_dst_type = DST_TYPE_IS_SAT; |
1062 | use_type_flags = DST_TYPE_HAS_SYMDIV; | 1064 | use_type_flags = DST_TYPE_HAS_SYMDIV; |
1063 | } | 1065 | } |
1064 | dst_type_print(use_dst_type); | 1066 | dst_type_print(state, use_dst_type); |
1065 | state->type_flags = use_type_flags; | 1067 | state->type_flags = use_type_flags; |
1066 | state->dst_type = use_dst_type; | 1068 | state->dst_type = use_dst_type; |
1067 | dst_type_flags_print(state->type_flags); | 1069 | dst_type_flags_print(state); |
1068 | 1070 | ||
1069 | return 0; | 1071 | return 0; |
1070 | } | 1072 | } |