Hi Christophe,
On Mon, Dec 08, 2014 at 10:08:11PM +0100, Christophe Ricard wrote:
struct nfc_hci_gate {
u8 gate;
u8 pipe;
-};
+} __packed;
Why does this one need to be packed ?
+struct nfc_hci_pipe {
+ u8 gate;
+ u8 dest_host;
+} __packed;
Ditto.
+void nfc_hci_reset_pipes_per_host(struct nfc_hci_dev *hdev, u8 host)
+{
+ int i = 0;
+
+ for (i = 0; i < NFC_HCI_MAX_PIPES; i++) {
+ if (hdev->pipes[i].dest_host == host) {
+ hdev->pipes[i].gate = NFC_HCI_INVALID_GATE;
+ hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST;
+ }
Nitpick:
if (hdev->pipes[i].dest_host != host)
continue;
hdev->pipes[i].gate = NFC_HCI_INVALID_GATE;
hdev->pipes[i].dest_host = NFC_HCI_INVALID_HOST;
is usually preferred.
Cheers,
Samuel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html