Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb9bc6e9 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville
Browse files

NFC: NCI code identation fixes

parent 0a40acb2
Loading
Loading
Loading
Loading
+54 −59
Original line number Diff line number Diff line
@@ -67,8 +67,7 @@ static void nci_req_cancel(struct nci_dev *ndev, int err)
/* Execute request and wait for completion. */
static int __nci_request(struct nci_dev *ndev,
			 void (*req)(struct nci_dev *ndev, unsigned long opt),
	unsigned long opt,
	__u32 timeout)
			 unsigned long opt, __u32 timeout)
{
	int rc = 0;
	long completion_rc;
@@ -77,8 +76,8 @@ static int __nci_request(struct nci_dev *ndev,

	init_completion(&ndev->req_completion);
	req(ndev, opt);
	completion_rc = wait_for_completion_interruptible_timeout(
							&ndev->req_completion,
	completion_rc =
		wait_for_completion_interruptible_timeout(&ndev->req_completion,
							  timeout);

	pr_debug("wait_for_completion return %ld\n", completion_rc);
@@ -110,7 +109,8 @@ static int __nci_request(struct nci_dev *ndev,
}

static inline int nci_request(struct nci_dev *ndev,
		void (*req)(struct nci_dev *ndev, unsigned long opt),
			      void (*req)(struct nci_dev *ndev,
					  unsigned long opt),
			      unsigned long opt, __u32 timeout)
{
	int rc;
@@ -172,8 +172,7 @@ static void nci_init_complete_req(struct nci_dev *ndev, unsigned long opt)
	}

	nci_send_cmd(ndev, NCI_OP_RF_DISCOVER_MAP_CMD,
		(1 + ((*num)*sizeof(struct disc_map_config))),
		&cmd);
		     (1 + ((*num) * sizeof(struct disc_map_config))), &cmd);
}

static void nci_rf_discover_req(struct nci_dev *ndev, unsigned long opt)
@@ -245,8 +244,7 @@ static void nci_rf_discover_select_req(struct nci_dev *ndev, unsigned long opt)
	}

	nci_send_cmd(ndev, NCI_OP_RF_DISCOVER_SELECT_CMD,
			sizeof(struct nci_rf_discover_select_cmd),
			&cmd);
		     sizeof(struct nci_rf_discover_select_cmd), &cmd);
}

static void nci_rf_deactivate_req(struct nci_dev *ndev, unsigned long opt)
@@ -256,8 +254,7 @@ static void nci_rf_deactivate_req(struct nci_dev *ndev, unsigned long opt)
	cmd.type = NCI_DEACTIVATE_TYPE_IDLE_MODE;

	nci_send_cmd(ndev, NCI_OP_RF_DEACTIVATE_CMD,
			sizeof(struct nci_rf_deactivate_cmd),
			&cmd);
		     sizeof(struct nci_rf_deactivate_cmd), &cmd);
}

static int nci_open_device(struct nci_dev *ndev)
@@ -525,8 +522,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, __u32 target_idx)

static int nci_data_exchange(struct nfc_dev *nfc_dev, __u32 target_idx,
			     struct sk_buff *skb,
						data_exchange_cb_t cb,
						void *cb_context)
			     data_exchange_cb_t cb, void *cb_context)
{
	struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
	int rc;
@@ -572,8 +568,7 @@ static struct nfc_ops nci_nfc_ops = {
 */
struct nci_dev *nci_allocate_device(struct nci_ops *ops,
				    __u32 supported_protocols,
					int tx_headroom,
					int tx_tailroom)
				    int tx_headroom, int tx_tailroom)
{
	struct nci_dev *ndev;

+14 −14
Original line number Diff line number Diff line
@@ -35,8 +35,7 @@
#include <linux/nfc.h>

/* Complete data exchange transaction and forward skb to nfc core */
void nci_data_exchange_complete(struct nci_dev *ndev,
				struct sk_buff *skb,
void nci_data_exchange_complete(struct nci_dev *ndev, struct sk_buff *skb,
				int err)
{
	data_exchange_cb_t cb = ndev->data_exchange_cb;
@@ -118,7 +117,8 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,

		/* second, set the header */
		nci_push_data_hdr(ndev, conn_id, skb_frag,
		((total_len == frag_len) ? (NCI_PBF_LAST) : (NCI_PBF_CONT)));
				  ((total_len == frag_len) ?
				   (NCI_PBF_LAST) : (NCI_PBF_CONT)));

		__skb_queue_tail(&frags_q, skb_frag);

+35 −40
Original line number Diff line number Diff line
@@ -335,20 +335,17 @@ static int nci_extract_activation_params_iso_dep(struct nci_dev *ndev,
		pr_debug("rats_res_len %d\n", nfca_poll->rats_res_len);
		if (nfca_poll->rats_res_len > 0) {
			memcpy(nfca_poll->rats_res,
				data,
				nfca_poll->rats_res_len);
			       data, nfca_poll->rats_res_len);
		}
		break;

	case NCI_NFC_B_PASSIVE_POLL_MODE:
		nfcb_poll = &ntf->activation_params.nfcb_poll_iso_dep;
		nfcb_poll->attrib_res_len = *data++;
		pr_debug("attrib_res_len %d\n",
			nfcb_poll->attrib_res_len);
		pr_debug("attrib_res_len %d\n", nfcb_poll->attrib_res_len);
		if (nfcb_poll->attrib_res_len > 0) {
			memcpy(nfcb_poll->attrib_res,
				data,
				nfcb_poll->attrib_res_len);
			       data, nfcb_poll->attrib_res_len);
		}
		break;

@@ -405,7 +402,8 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
		 ntf.activation_rf_tech_and_mode);
	pr_debug("max_data_pkt_payload_size 0x%x\n",
		 ntf.max_data_pkt_payload_size);
	pr_debug("initial_num_credits 0x%x\n", ntf.initial_num_credits);
	pr_debug("initial_num_credits 0x%x\n",
		 ntf.initial_num_credits);
	pr_debug("rf_tech_specific_params_len %d\n",
		 ntf.rf_tech_specific_params_len);

@@ -441,12 +439,9 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,

	pr_debug("data_exch_rf_tech_and_mode 0x%x\n",
		 ntf.data_exch_rf_tech_and_mode);
	pr_debug("data_exch_tx_bit_rate 0x%x\n",
		 ntf.data_exch_tx_bit_rate);
	pr_debug("data_exch_rx_bit_rate 0x%x\n",
		 ntf.data_exch_rx_bit_rate);
	pr_debug("activation_params_len %d\n",
		 ntf.activation_params_len);
	pr_debug("data_exch_tx_bit_rate 0x%x\n", ntf.data_exch_tx_bit_rate);
	pr_debug("data_exch_rx_bit_rate 0x%x\n", ntf.data_exch_rx_bit_rate);
	pr_debug("activation_params_len %d\n", ntf.activation_params_len);

	if (ntf.activation_params_len > 0) {
		switch (ntf.rf_interface) {
+8 −9
Original line number Diff line number Diff line
@@ -78,8 +78,7 @@ static void nci_core_init_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)

	rsp_2 = (void *) (skb->data + 6 + rsp_1->num_supported_rf_interfaces);

	ndev->max_logical_connections =
		rsp_2->max_logical_connections;
	ndev->max_logical_connections = rsp_2->max_logical_connections;
	ndev->max_routing_table_size =
		__le16_to_cpu(rsp_2->max_routing_table_size);
	ndev->max_ctrl_pkt_payload_len =
+5 −5

File changed.

Contains only whitespace changes.