Re: [PATCH 1/4] Bluetooth: Introduce to_hci_dev()

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

 



Hi David,

> We currently use dev_set_drvdata to keep a pointer to ourself. This
> doesn't make sense as we are the bus and not a driver. Therefore,
> introduce to_hci_dev() so we can get a struct hci_dev pointer from a
> struct device pointer.
> 
> dev_set/get_drvdata() is reserved for drivers that provide a device and
> not for the bus using the device. The bus can use simple pointer
> arithmetic to retrieve its private data.
> 
> Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx>
> ---
>  include/net/bluetooth/hci_core.h |    2 ++
>  net/bluetooth/hci_sysfs.c        |   33 ++++++++++++++++-----------------
>  2 files changed, 18 insertions(+), 17 deletions(-)

Acked-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>

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


[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