diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-09 15:58:32 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:37 -0500 |
commit | 155961e8001719af6d87cbcc961111e8ce477843 (patch) | |
tree | 5b2485b5a7b2074f9e01111cf8539a34f34ce2d5 /drivers/bluetooth/bpa10x.c | |
parent | aa2b86d761a95068354511de755695ef6b53afc7 (diff) |
Bluetooth: Remove hci_dev->driver_data
The linux device model provides dev_set/get_drvdata so we can use this
to save private driver data.
This also removes several unnecessary casts.
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>
Diffstat (limited to 'drivers/bluetooth/bpa10x.c')
-rw-r--r-- | drivers/bluetooth/bpa10x.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 9d635148104c..d894340a7601 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
@@ -66,7 +66,7 @@ struct hci_vendor_hdr { | |||
66 | 66 | ||
67 | static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) | 67 | static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) |
68 | { | 68 | { |
69 | struct bpa10x_data *data = hdev->driver_data; | 69 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
70 | 70 | ||
71 | BT_DBG("%s queue %d buffer %p count %d", hdev->name, | 71 | BT_DBG("%s queue %d buffer %p count %d", hdev->name, |
72 | queue, buf, count); | 72 | queue, buf, count); |
@@ -189,7 +189,7 @@ done: | |||
189 | static void bpa10x_rx_complete(struct urb *urb) | 189 | static void bpa10x_rx_complete(struct urb *urb) |
190 | { | 190 | { |
191 | struct hci_dev *hdev = urb->context; | 191 | struct hci_dev *hdev = urb->context; |
192 | struct bpa10x_data *data = hdev->driver_data; | 192 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
193 | int err; | 193 | int err; |
194 | 194 | ||
195 | BT_DBG("%s urb %p status %d count %d", hdev->name, | 195 | BT_DBG("%s urb %p status %d count %d", hdev->name, |
@@ -219,7 +219,7 @@ static void bpa10x_rx_complete(struct urb *urb) | |||
219 | 219 | ||
220 | static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) | 220 | static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) |
221 | { | 221 | { |
222 | struct bpa10x_data *data = hdev->driver_data; | 222 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
223 | struct urb *urb; | 223 | struct urb *urb; |
224 | unsigned char *buf; | 224 | unsigned char *buf; |
225 | unsigned int pipe; | 225 | unsigned int pipe; |
@@ -260,7 +260,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) | |||
260 | 260 | ||
261 | static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) | 261 | static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) |
262 | { | 262 | { |
263 | struct bpa10x_data *data = hdev->driver_data; | 263 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
264 | struct urb *urb; | 264 | struct urb *urb; |
265 | unsigned char *buf; | 265 | unsigned char *buf; |
266 | unsigned int pipe; | 266 | unsigned int pipe; |
@@ -301,7 +301,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) | |||
301 | 301 | ||
302 | static int bpa10x_open(struct hci_dev *hdev) | 302 | static int bpa10x_open(struct hci_dev *hdev) |
303 | { | 303 | { |
304 | struct bpa10x_data *data = hdev->driver_data; | 304 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
305 | int err; | 305 | int err; |
306 | 306 | ||
307 | BT_DBG("%s", hdev->name); | 307 | BT_DBG("%s", hdev->name); |
@@ -329,7 +329,7 @@ error: | |||
329 | 329 | ||
330 | static int bpa10x_close(struct hci_dev *hdev) | 330 | static int bpa10x_close(struct hci_dev *hdev) |
331 | { | 331 | { |
332 | struct bpa10x_data *data = hdev->driver_data; | 332 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
333 | 333 | ||
334 | BT_DBG("%s", hdev->name); | 334 | BT_DBG("%s", hdev->name); |
335 | 335 | ||
@@ -343,7 +343,7 @@ static int bpa10x_close(struct hci_dev *hdev) | |||
343 | 343 | ||
344 | static int bpa10x_flush(struct hci_dev *hdev) | 344 | static int bpa10x_flush(struct hci_dev *hdev) |
345 | { | 345 | { |
346 | struct bpa10x_data *data = hdev->driver_data; | 346 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
347 | 347 | ||
348 | BT_DBG("%s", hdev->name); | 348 | BT_DBG("%s", hdev->name); |
349 | 349 | ||
@@ -355,7 +355,7 @@ static int bpa10x_flush(struct hci_dev *hdev) | |||
355 | static int bpa10x_send_frame(struct sk_buff *skb) | 355 | static int bpa10x_send_frame(struct sk_buff *skb) |
356 | { | 356 | { |
357 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | 357 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; |
358 | struct bpa10x_data *data = hdev->driver_data; | 358 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
359 | struct usb_ctrlrequest *dr; | 359 | struct usb_ctrlrequest *dr; |
360 | struct urb *urb; | 360 | struct urb *urb; |
361 | unsigned int pipe; | 361 | unsigned int pipe; |
@@ -459,7 +459,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id * | |||
459 | } | 459 | } |
460 | 460 | ||
461 | hdev->bus = HCI_USB; | 461 | hdev->bus = HCI_USB; |
462 | hdev->driver_data = data; | 462 | hci_set_drvdata(hdev, data); |
463 | 463 | ||
464 | data->hdev = hdev; | 464 | data->hdev = hdev; |
465 | 465 | ||