aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/ntf.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-11-29 14:37:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-30 15:08:36 -0500
commit20c239c1390bd6f3bb389fe1a7e8307f29f52563 (patch)
treec78b5099bd642482ef69531ba19bbff0ce33e4cf /net/nfc/nci/ntf.c
parented1e0ad8816389ceefa2d94a9a3d3520088e410f (diff)
nfc: Convert nfc_dbg to pr_debug
Using the standard debugging mechanisms is better than subsystem specific ones when the subsystem doesn't use a specific struct. Coalesce long formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/nci/ntf.c')
-rw-r--r--net/nfc/nci/ntf.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index c7043507fc68..f26edc09aa97 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -45,16 +45,16 @@ static void nci_core_conn_credits_ntf_packet(struct nci_dev *ndev,
45 struct nci_core_conn_credit_ntf *ntf = (void *) skb->data; 45 struct nci_core_conn_credit_ntf *ntf = (void *) skb->data;
46 int i; 46 int i;
47 47
48 nfc_dbg("entry, num_entries %d", ntf->num_entries); 48 pr_debug("entry, num_entries %d\n", ntf->num_entries);
49 49
50 if (ntf->num_entries > NCI_MAX_NUM_CONN) 50 if (ntf->num_entries > NCI_MAX_NUM_CONN)
51 ntf->num_entries = NCI_MAX_NUM_CONN; 51 ntf->num_entries = NCI_MAX_NUM_CONN;
52 52
53 /* update the credits */ 53 /* update the credits */
54 for (i = 0; i < ntf->num_entries; i++) { 54 for (i = 0; i < ntf->num_entries; i++) {
55 nfc_dbg("entry[%d]: conn_id %d, credits %d", i, 55 pr_debug("entry[%d]: conn_id %d, credits %d\n",
56 ntf->conn_entries[i].conn_id, 56 i, ntf->conn_entries[i].conn_id,
57 ntf->conn_entries[i].credits); 57 ntf->conn_entries[i].credits);
58 58
59 if (ntf->conn_entries[i].conn_id == NCI_STATIC_RF_CONN_ID) { 59 if (ntf->conn_entries[i].conn_id == NCI_STATIC_RF_CONN_ID) {
60 /* found static rf connection */ 60 /* found static rf connection */
@@ -80,9 +80,8 @@ static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
80 80
81 nfca_poll->nfcid1_len = *data++; 81 nfca_poll->nfcid1_len = *data++;
82 82
83 nfc_dbg("sens_res 0x%x, nfcid1_len %d", 83 pr_debug("sens_res 0x%x, nfcid1_len %d\n",
84 nfca_poll->sens_res, 84 nfca_poll->sens_res, nfca_poll->nfcid1_len);
85 nfca_poll->nfcid1_len);
86 85
87 memcpy(nfca_poll->nfcid1, data, nfca_poll->nfcid1_len); 86 memcpy(nfca_poll->nfcid1, data, nfca_poll->nfcid1_len);
88 data += nfca_poll->nfcid1_len; 87 data += nfca_poll->nfcid1_len;
@@ -92,9 +91,9 @@ static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
92 if (nfca_poll->sel_res_len != 0) 91 if (nfca_poll->sel_res_len != 0)
93 nfca_poll->sel_res = *data++; 92 nfca_poll->sel_res = *data++;
94 93
95 nfc_dbg("sel_res_len %d, sel_res 0x%x", 94 pr_debug("sel_res_len %d, sel_res 0x%x\n",
96 nfca_poll->sel_res_len, 95 nfca_poll->sel_res_len,
97 nfca_poll->sel_res); 96 nfca_poll->sel_res);
98 97
99 return data; 98 return data;
100} 99}
@@ -140,12 +139,12 @@ static void nci_target_found(struct nci_dev *ndev,
140 nfc_tgt.sel_res = ntf->rf_tech_specific_params.nfca_poll.sel_res; 139 nfc_tgt.sel_res = ntf->rf_tech_specific_params.nfca_poll.sel_res;
141 140
142 if (!(nfc_tgt.supported_protocols & ndev->poll_prots)) { 141 if (!(nfc_tgt.supported_protocols & ndev->poll_prots)) {
143 nfc_dbg("the target found does not have the desired protocol"); 142 pr_debug("the target found does not have the desired protocol\n");
144 return; 143 return;
145 } 144 }
146 145
147 nfc_dbg("new target found, supported_protocols 0x%x", 146 pr_debug("new target found, supported_protocols 0x%x\n",
148 nfc_tgt.supported_protocols); 147 nfc_tgt.supported_protocols);
149 148
150 ndev->target_available_prots = nfc_tgt.supported_protocols; 149 ndev->target_available_prots = nfc_tgt.supported_protocols;
151 150
@@ -168,13 +167,13 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
168 ntf.activation_rf_tech_and_mode = *data++; 167 ntf.activation_rf_tech_and_mode = *data++;
169 ntf.rf_tech_specific_params_len = *data++; 168 ntf.rf_tech_specific_params_len = *data++;
170 169
171 nfc_dbg("rf_discovery_id %d", ntf.rf_discovery_id); 170 pr_debug("rf_discovery_id %d\n", ntf.rf_discovery_id);
172 nfc_dbg("rf_interface_type 0x%x", ntf.rf_interface_type); 171 pr_debug("rf_interface_type 0x%x\n", ntf.rf_interface_type);
173 nfc_dbg("rf_protocol 0x%x", ntf.rf_protocol); 172 pr_debug("rf_protocol 0x%x\n", ntf.rf_protocol);
174 nfc_dbg("activation_rf_tech_and_mode 0x%x", 173 pr_debug("activation_rf_tech_and_mode 0x%x\n",
175 ntf.activation_rf_tech_and_mode); 174 ntf.activation_rf_tech_and_mode);
176 nfc_dbg("rf_tech_specific_params_len %d", 175 pr_debug("rf_tech_specific_params_len %d\n",
177 ntf.rf_tech_specific_params_len); 176 ntf.rf_tech_specific_params_len);
178 177
179 if (ntf.rf_tech_specific_params_len > 0) { 178 if (ntf.rf_tech_specific_params_len > 0) {
180 switch (ntf.activation_rf_tech_and_mode) { 179 switch (ntf.activation_rf_tech_and_mode) {
@@ -195,14 +194,14 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
195 ntf.data_exch_rx_bit_rate = *data++; 194 ntf.data_exch_rx_bit_rate = *data++;
196 ntf.activation_params_len = *data++; 195 ntf.activation_params_len = *data++;
197 196
198 nfc_dbg("data_exch_rf_tech_and_mode 0x%x", 197 pr_debug("data_exch_rf_tech_and_mode 0x%x\n",
199 ntf.data_exch_rf_tech_and_mode); 198 ntf.data_exch_rf_tech_and_mode);
200 nfc_dbg("data_exch_tx_bit_rate 0x%x", 199 pr_debug("data_exch_tx_bit_rate 0x%x\n",
201 ntf.data_exch_tx_bit_rate); 200 ntf.data_exch_tx_bit_rate);
202 nfc_dbg("data_exch_rx_bit_rate 0x%x", 201 pr_debug("data_exch_rx_bit_rate 0x%x\n",
203 ntf.data_exch_rx_bit_rate); 202 ntf.data_exch_rx_bit_rate);
204 nfc_dbg("activation_params_len %d", 203 pr_debug("activation_params_len %d\n",
205 ntf.activation_params_len); 204 ntf.activation_params_len);
206 205
207 if (ntf.activation_params_len > 0) { 206 if (ntf.activation_params_len > 0) {
208 switch (ntf.rf_interface_type) { 207 switch (ntf.rf_interface_type) {
@@ -231,7 +230,7 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev,
231{ 230{
232 struct nci_rf_deactivate_ntf *ntf = (void *) skb->data; 231 struct nci_rf_deactivate_ntf *ntf = (void *) skb->data;
233 232
234 nfc_dbg("entry, type 0x%x, reason 0x%x", ntf->type, ntf->reason); 233 pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason);
235 234
236 clear_bit(NCI_POLL_ACTIVE, &ndev->flags); 235 clear_bit(NCI_POLL_ACTIVE, &ndev->flags);
237 ndev->target_active_prot = 0; 236 ndev->target_active_prot = 0;
@@ -257,11 +256,11 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
257{ 256{
258 __u16 ntf_opcode = nci_opcode(skb->data); 257 __u16 ntf_opcode = nci_opcode(skb->data);
259 258
260 nfc_dbg("NCI RX: MT=ntf, PBF=%d, GID=0x%x, OID=0x%x, plen=%d", 259 pr_debug("NCI RX: MT=ntf, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n",
261 nci_pbf(skb->data), 260 nci_pbf(skb->data),
262 nci_opcode_gid(ntf_opcode), 261 nci_opcode_gid(ntf_opcode),
263 nci_opcode_oid(ntf_opcode), 262 nci_opcode_oid(ntf_opcode),
264 nci_plen(skb->data)); 263 nci_plen(skb->data));
265 264
266 /* strip the nci control header */ 265 /* strip the nci control header */
267 skb_pull(skb, NCI_CTRL_HDR_SIZE); 266 skb_pull(skb, NCI_CTRL_HDR_SIZE);