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/btsdio.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/btsdio.c')
-rw-r--r-- | drivers/bluetooth/btsdio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 2d6e4ed1637f..e10ea0347051 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c | |||
@@ -189,7 +189,7 @@ static void btsdio_interrupt(struct sdio_func *func) | |||
189 | 189 | ||
190 | static int btsdio_open(struct hci_dev *hdev) | 190 | static int btsdio_open(struct hci_dev *hdev) |
191 | { | 191 | { |
192 | struct btsdio_data *data = hdev->driver_data; | 192 | struct btsdio_data *data = hci_get_drvdata(hdev); |
193 | int err; | 193 | int err; |
194 | 194 | ||
195 | BT_DBG("%s", hdev->name); | 195 | BT_DBG("%s", hdev->name); |
@@ -225,7 +225,7 @@ release: | |||
225 | 225 | ||
226 | static int btsdio_close(struct hci_dev *hdev) | 226 | static int btsdio_close(struct hci_dev *hdev) |
227 | { | 227 | { |
228 | struct btsdio_data *data = hdev->driver_data; | 228 | struct btsdio_data *data = hci_get_drvdata(hdev); |
229 | 229 | ||
230 | BT_DBG("%s", hdev->name); | 230 | BT_DBG("%s", hdev->name); |
231 | 231 | ||
@@ -246,7 +246,7 @@ static int btsdio_close(struct hci_dev *hdev) | |||
246 | 246 | ||
247 | static int btsdio_flush(struct hci_dev *hdev) | 247 | static int btsdio_flush(struct hci_dev *hdev) |
248 | { | 248 | { |
249 | struct btsdio_data *data = hdev->driver_data; | 249 | struct btsdio_data *data = hci_get_drvdata(hdev); |
250 | 250 | ||
251 | BT_DBG("%s", hdev->name); | 251 | BT_DBG("%s", hdev->name); |
252 | 252 | ||
@@ -258,7 +258,7 @@ static int btsdio_flush(struct hci_dev *hdev) | |||
258 | static int btsdio_send_frame(struct sk_buff *skb) | 258 | static int btsdio_send_frame(struct sk_buff *skb) |
259 | { | 259 | { |
260 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | 260 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; |
261 | struct btsdio_data *data = hdev->driver_data; | 261 | struct btsdio_data *data = hci_get_drvdata(hdev); |
262 | 262 | ||
263 | BT_DBG("%s", hdev->name); | 263 | BT_DBG("%s", hdev->name); |
264 | 264 | ||
@@ -321,7 +321,7 @@ static int btsdio_probe(struct sdio_func *func, | |||
321 | } | 321 | } |
322 | 322 | ||
323 | hdev->bus = HCI_SDIO; | 323 | hdev->bus = HCI_SDIO; |
324 | hdev->driver_data = data; | 324 | hci_set_drvdata(hdev, data); |
325 | 325 | ||
326 | if (id->class == SDIO_CLASS_BT_AMP) | 326 | if (id->class == SDIO_CLASS_BT_AMP) |
327 | hdev->dev_type = HCI_AMP; | 327 | hdev->dev_type = HCI_AMP; |