aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-03-04 19:03:53 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:25 -0500
commit0a40acb24602783fcf6881f915659148aa9807d7 (patch)
treeaad4a42c270c615fdc67f454f974794e8fcd2160 /net/nfc/core.c
parent427a2eb1f568c9c5934a36105232c94553db9b69 (diff)
NFC: Core code identation fixes
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/core.c')
-rw-r--r--net/nfc/core.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index f4f526f7321..295d129864d 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -256,7 +256,7 @@ error:
256} 256}
257 257
258int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, 258int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
259 u8 comm_mode, u8 rf_mode) 259 u8 comm_mode, u8 rf_mode)
260{ 260{
261 dev->dep_link_up = true; 261 dev->dep_link_up = true;
262 dev->dep_rf_mode = rf_mode; 262 dev->dep_rf_mode = rf_mode;
@@ -336,10 +336,8 @@ error:
336 * 336 *
337 * The user must wait for the callback before calling this function again. 337 * The user must wait for the callback before calling this function again.
338 */ 338 */
339int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, 339int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,
340 struct sk_buff *skb, 340 data_exchange_cb_t cb, void *cb_context)
341 data_exchange_cb_t cb,
342 void *cb_context)
343{ 341{
344 int rc; 342 int rc;
345 343
@@ -363,8 +361,7 @@ error:
363 361
364int nfc_set_remote_general_bytes(struct nfc_dev *dev, u8 *gb, u8 gb_len) 362int nfc_set_remote_general_bytes(struct nfc_dev *dev, u8 *gb, u8 gb_len)
365{ 363{
366 pr_debug("dev_name=%s gb_len=%d\n", 364 pr_debug("dev_name=%s gb_len=%d\n", dev_name(&dev->dev), gb_len);
367 dev_name(&dev->dev), gb_len);
368 365
369 if (gb_len > NFC_MAX_GT_LEN) 366 if (gb_len > NFC_MAX_GT_LEN)
370 return -EINVAL; 367 return -EINVAL;
@@ -380,8 +377,8 @@ EXPORT_SYMBOL(nfc_set_remote_general_bytes);
380 * @gfp: gfp flags 377 * @gfp: gfp flags
381 */ 378 */
382struct sk_buff *nfc_alloc_send_skb(struct nfc_dev *dev, struct sock *sk, 379struct sk_buff *nfc_alloc_send_skb(struct nfc_dev *dev, struct sock *sk,
383 unsigned int flags, unsigned int size, 380 unsigned int flags, unsigned int size,
384 unsigned int *err) 381 unsigned int *err)
385{ 382{
386 struct sk_buff *skb; 383 struct sk_buff *skb;
387 unsigned int total_size; 384 unsigned int total_size;
@@ -428,8 +425,8 @@ EXPORT_SYMBOL(nfc_alloc_recv_skb);
428 * are found. After calling this function, the device driver must stop 425 * are found. After calling this function, the device driver must stop
429 * polling for targets. 426 * polling for targets.
430 */ 427 */
431int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, 428int nfc_targets_found(struct nfc_dev *dev,
432 int n_targets) 429 struct nfc_target *targets, int n_targets)
433{ 430{
434 pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets); 431 pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets);
435 432
@@ -441,7 +438,7 @@ int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets,
441 438
442 kfree(dev->targets); 439 kfree(dev->targets);
443 dev->targets = kmemdup(targets, n_targets * sizeof(struct nfc_target), 440 dev->targets = kmemdup(targets, n_targets * sizeof(struct nfc_target),
444 GFP_ATOMIC); 441 GFP_ATOMIC);
445 442
446 if (!dev->targets) { 443 if (!dev->targets) {
447 dev->n_targets = 0; 444 dev->n_targets = 0;
@@ -501,15 +498,14 @@ struct nfc_dev *nfc_get_device(unsigned idx)
501 * @supported_protocols: NFC protocols supported by the device 498 * @supported_protocols: NFC protocols supported by the device
502 */ 499 */
503struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, 500struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
504 u32 supported_protocols, 501 u32 supported_protocols,
505 int tx_headroom, 502 int tx_headroom, int tx_tailroom)
506 int tx_tailroom)
507{ 503{
508 static atomic_t dev_no = ATOMIC_INIT(0); 504 static atomic_t dev_no = ATOMIC_INIT(0);
509 struct nfc_dev *dev; 505 struct nfc_dev *dev;
510 506
511 if (!ops->start_poll || !ops->stop_poll || !ops->activate_target || 507 if (!ops->start_poll || !ops->stop_poll || !ops->activate_target ||
512 !ops->deactivate_target || !ops->data_exchange) 508 !ops->deactivate_target || !ops->data_exchange)
513 return NULL; 509 return NULL;
514 510
515 if (!supported_protocols) 511 if (!supported_protocols)