Hi Loic, > Move intel_device searching procedure in a standalone function since it > will be used from different places in the driver. > > Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxx> > --- > drivers/bluetooth/hci_intel.c | 49 +++++++++++++++++++++++++++---------------- > 1 file changed, 31 insertions(+), 18 deletions(-) > > diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c > index 934b5a7..26a1314 100644 > --- a/drivers/bluetooth/hci_intel.c > +++ b/drivers/bluetooth/hci_intel.c > @@ -93,6 +93,24 @@ static u8 intel_convert_speed(unsigned int speed) > } > } > > +static struct intel_device *intel_device_get(struct hci_uart *hu) > +{ > + struct list_head *p; > + > + list_for_each(p, &intel_device_list) { > + struct intel_device *idev = list_entry(p, struct intel_device, > + list); > + > + /* tty device and pdev device should share the same parent > + * which is the UART port. > + */ > + if (hu->tty->dev->parent == idev->pdev->dev.parent) > + return idev; > + } > + > + return NULL; > +} > + lets see how many times this actually needs to be used. I really want to keep this rather simple. Regards Marcel -- 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