Commit 0a40acb2 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville

NFC: Core code identation fixes

Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 427a2eb1
...@@ -179,8 +179,8 @@ struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp); ...@@ -179,8 +179,8 @@ struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp);
int nfc_set_remote_general_bytes(struct nfc_dev *dev, int nfc_set_remote_general_bytes(struct nfc_dev *dev,
u8 *gt, u8 gt_len); u8 *gt, u8 gt_len);
int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, int nfc_targets_found(struct nfc_dev *dev,
int ntargets); struct nfc_target *targets, int ntargets);
int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
u8 comm_mode, u8 rf_mode); u8 comm_mode, u8 rf_mode);
......
...@@ -336,10 +336,8 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx) ...@@ -336,10 +336,8 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx)
* *
* The user must wait for the callback before calling this function again. * The user must wait for the callback before calling this function again.
*/ */
int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,
struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context)
data_exchange_cb_t cb,
void *cb_context)
{ {
int rc; int rc;
...@@ -363,8 +361,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, ...@@ -363,8 +361,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx,
int nfc_set_remote_general_bytes(struct nfc_dev *dev, u8 *gb, u8 gb_len) int nfc_set_remote_general_bytes(struct nfc_dev *dev, u8 *gb, u8 gb_len)
{ {
pr_debug("dev_name=%s gb_len=%d\n", pr_debug("dev_name=%s gb_len=%d\n", dev_name(&dev->dev), gb_len);
dev_name(&dev->dev), gb_len);
if (gb_len > NFC_MAX_GT_LEN) if (gb_len > NFC_MAX_GT_LEN)
return -EINVAL; return -EINVAL;
...@@ -428,8 +425,8 @@ EXPORT_SYMBOL(nfc_alloc_recv_skb); ...@@ -428,8 +425,8 @@ EXPORT_SYMBOL(nfc_alloc_recv_skb);
* are found. After calling this function, the device driver must stop * are found. After calling this function, the device driver must stop
* polling for targets. * polling for targets.
*/ */
int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, int nfc_targets_found(struct nfc_dev *dev,
int n_targets) struct nfc_target *targets, int n_targets)
{ {
pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets); pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets);
...@@ -502,8 +499,7 @@ struct nfc_dev *nfc_get_device(unsigned idx) ...@@ -502,8 +499,7 @@ struct nfc_dev *nfc_get_device(unsigned idx)
*/ */
struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
u32 supported_protocols, u32 supported_protocols,
int tx_headroom, int tx_headroom, int tx_tailroom)
int tx_tailroom)
{ {
static atomic_t dev_no = ATOMIC_INIT(0); static atomic_t dev_no = ATOMIC_INIT(0);
struct nfc_dev *dev; struct nfc_dev *dev;
......
...@@ -64,8 +64,7 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target, ...@@ -64,8 +64,7 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
genl_dump_check_consistent(cb, hdr, &nfc_genl_family); genl_dump_check_consistent(cb, hdr, &nfc_genl_family);
NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target->idx); NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target->idx);
NLA_PUT_U32(msg, NFC_ATTR_PROTOCOLS, NLA_PUT_U32(msg, NFC_ATTR_PROTOCOLS, target->supported_protocols);
target->supported_protocols);
NLA_PUT_U16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res); NLA_PUT_U16(msg, NFC_ATTR_TARGET_SENS_RES, target->sens_res);
NLA_PUT_U8(msg, NFC_ATTR_TARGET_SEL_RES, target->sel_res); NLA_PUT_U8(msg, NFC_ATTR_TARGET_SEL_RES, target->sel_res);
if (target->nfcid1_len > 0) if (target->nfcid1_len > 0)
...@@ -300,8 +299,7 @@ static int nfc_genl_dump_devices(struct sk_buff *skb, ...@@ -300,8 +299,7 @@ static int nfc_genl_dump_devices(struct sk_buff *skb,
int rc; int rc;
rc = nfc_genl_send_device(skb, dev, NETLINK_CB(cb->skb).pid, rc = nfc_genl_send_device(skb, dev, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, cb->nlh->nlmsg_seq, cb, NLM_F_MULTI);
cb, NLM_F_MULTI);
if (rc < 0) if (rc < 0)
break; break;
...@@ -337,8 +335,7 @@ int nfc_genl_dep_link_up_event(struct nfc_dev *dev, u32 target_idx, ...@@ -337,8 +335,7 @@ int nfc_genl_dep_link_up_event(struct nfc_dev *dev, u32 target_idx,
if (!msg) if (!msg)
return -ENOMEM; return -ENOMEM;
hdr = genlmsg_put(msg, 0, 0, &nfc_genl_family, 0, hdr = genlmsg_put(msg, 0, 0, &nfc_genl_family, 0, NFC_CMD_DEP_LINK_UP);
NFC_CMD_DEP_LINK_UP);
if (!hdr) if (!hdr)
goto free_msg; goto free_msg;
......
...@@ -78,7 +78,8 @@ static inline void nfc_llcp_unregister_device(struct nfc_dev *dev) ...@@ -78,7 +78,8 @@ static inline void nfc_llcp_unregister_device(struct nfc_dev *dev)
{ {
} }
static inline int nfc_llcp_set_remote_gb(struct nfc_dev *dev, u8 *gb, u8 gb_len) static inline int nfc_llcp_set_remote_gb(struct nfc_dev *dev,
u8 *gb, u8 gb_len)
{ {
return 0; return 0;
} }
...@@ -168,9 +169,7 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol); ...@@ -168,9 +169,7 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol);
int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx); int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx);
int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,
struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context);
data_exchange_cb_t cb,
void *cb_context);
#endif /* __LOCAL_NFC_H */ #endif /* __LOCAL_NFC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment