]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: Remove redundant hdev->parent field
authorDavid Herrmann <dh.herrmann@googlemail.com>
Fri, 9 Mar 2012 14:53:42 +0000 (15:53 +0100)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 28 Mar 2012 14:39:06 +0000 (11:39 -0300)
commitae516a84b3d28a695b6d70484cee8d8dd75f2024
tree7725902e8077bd5a63ff6f599a15d7c256182590
parent74e05692c9599866d5c8743764544cf77cd1af87
Bluetooth: Remove redundant hdev->parent field

We initialize the "struct device" in hci_alloc_dev() for a long time now
so we can access hdev->dev.parent directly. Hence, we can drop the
temporary field hdev->parent which is used in no other place than
hci_add_sysfs().

SET_HCIDEV_DEV() is never called after registering a device by the
drivers so we do not overwrite internal device-state. Furthermore,
hdev->dev is initialized to 0 by kzalloc() inside hci_alloc_dev() so the
default behavior with dev.parent = NULL is kept.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_ldisc.c
include/net/bluetooth/hci_core.h
net/bluetooth/hci_sysfs.c