Re: [PATCH 4/5] Bluetooth: hci_intel: Add intel_data_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

struct intel_data {
+	struct list_head list;

this is the private data associated with the hci_uart. I am not turning this into a list.

+static struct intel_data *intel_data_get(struct intel_device *idev)
+{
+	struct list_head *p;
+
+	list_for_each(p, &intel_data_list) {
+		struct intel_data *intel = list_entry(p, struct intel_data,
+						      list);
+
+		/* tty device and pdev device should share the same parent
+		 * which is the UART port.
+		 */
+		if (intel->hu->tty->dev->parent == idev->pdev->dev.parent)
+			return intel;
+	}
+
+	return NULL;
+}
+

You really need to come up with something else. intel_data is not a list. It is private data for hci_uart.


Do you mean having an other simple list:
struct intel_hu {
	struct list_head list;
	struct hci_uart *hu;
}

Regards,
Loic

--
Intel Open Source Technology Center
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux