Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290949
b: refs/heads/master
c: 155961e
h: refs/heads/master
i:
  290947: b7f742d
v: v3
  • Loading branch information
David Herrmann authored and Johan Hedberg committed Feb 13, 2012
1 parent 9ea07d4 commit 26771a7
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 80 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa2b86d761a95068354511de755695ef6b53afc7
refs/heads/master: 155961e8001719af6d87cbcc961111e8ce477843
10 changes: 5 additions & 5 deletions trunk/drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static void bfusb_rx_complete(struct urb *urb)

static int bfusb_open(struct hci_dev *hdev)
{
struct bfusb_data *data = hdev->driver_data;
struct bfusb_data *data = hci_get_drvdata(hdev);
unsigned long flags;
int i, err;

Expand All @@ -437,7 +437,7 @@ static int bfusb_open(struct hci_dev *hdev)

static int bfusb_flush(struct hci_dev *hdev)
{
struct bfusb_data *data = hdev->driver_data;
struct bfusb_data *data = hci_get_drvdata(hdev);

BT_DBG("hdev %p bfusb %p", hdev, data);

Expand All @@ -448,7 +448,7 @@ static int bfusb_flush(struct hci_dev *hdev)

static int bfusb_close(struct hci_dev *hdev)
{
struct bfusb_data *data = hdev->driver_data;
struct bfusb_data *data = hci_get_drvdata(hdev);
unsigned long flags;

BT_DBG("hdev %p bfusb %p", hdev, data);
Expand Down Expand Up @@ -483,7 +483,7 @@ static int bfusb_send_frame(struct sk_buff *skb)
if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY;

data = hdev->driver_data;
data = hci_get_drvdata(hdev);

switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
Expand Down Expand Up @@ -696,7 +696,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
data->hdev = hdev;

hdev->bus = HCI_USB;
hdev->driver_data = data;
hci_set_drvdata(hdev, data);
SET_HCIDEV_DEV(hdev, &intf->dev);

hdev->open = bfusb_open;
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/bluetooth/bluecard_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)

static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
bluecard_info_t *info = hci_get_drvdata(hdev);
struct sk_buff *skb;

/* Ericsson baud rate command */
Expand Down Expand Up @@ -609,7 +609,7 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)

static int bluecard_hci_flush(struct hci_dev *hdev)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
bluecard_info_t *info = hci_get_drvdata(hdev);

/* Drop TX queue */
skb_queue_purge(&(info->txq));
Expand All @@ -620,7 +620,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev)

static int bluecard_hci_open(struct hci_dev *hdev)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
Expand All @@ -640,7 +640,7 @@ static int bluecard_hci_open(struct hci_dev *hdev)

static int bluecard_hci_close(struct hci_dev *hdev)
{
bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
bluecard_info_t *info = hci_get_drvdata(hdev);
unsigned int iobase = info->p_dev->resource[0]->start;

if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
Expand All @@ -667,7 +667,7 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)
return -ENODEV;
}

info = (bluecard_info_t *)(hdev->driver_data);
info = hci_get_drvdata(hdev);

switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
Expand Down Expand Up @@ -729,7 +729,7 @@ static int bluecard_open(bluecard_info_t *info)
info->hdev = hdev;

hdev->bus = HCI_PCCARD;
hdev->driver_data = info;
hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);

hdev->open = bluecard_hci_open;
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/bluetooth/bpa10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct hci_vendor_hdr {

static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);

BT_DBG("%s queue %d buffer %p count %d", hdev->name,
queue, buf, count);
Expand Down Expand Up @@ -189,7 +189,7 @@ static void bpa10x_tx_complete(struct urb *urb)
static void bpa10x_rx_complete(struct urb *urb)
{
struct hci_dev *hdev = urb->context;
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);
int err;

BT_DBG("%s urb %p status %d count %d", hdev->name,
Expand Down Expand Up @@ -219,7 +219,7 @@ static void bpa10x_rx_complete(struct urb *urb)

static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);
struct urb *urb;
unsigned char *buf;
unsigned int pipe;
Expand Down Expand Up @@ -260,7 +260,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)

static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);
struct urb *urb;
unsigned char *buf;
unsigned int pipe;
Expand Down Expand Up @@ -301,7 +301,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)

static int bpa10x_open(struct hci_dev *hdev)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);
int err;

BT_DBG("%s", hdev->name);
Expand Down Expand Up @@ -329,7 +329,7 @@ static int bpa10x_open(struct hci_dev *hdev)

static int bpa10x_close(struct hci_dev *hdev)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);

BT_DBG("%s", hdev->name);

Expand All @@ -343,7 +343,7 @@ static int bpa10x_close(struct hci_dev *hdev)

static int bpa10x_flush(struct hci_dev *hdev)
{
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);

BT_DBG("%s", hdev->name);

Expand All @@ -355,7 +355,7 @@ static int bpa10x_flush(struct hci_dev *hdev)
static int bpa10x_send_frame(struct sk_buff *skb)
{
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct bpa10x_data *data = hdev->driver_data;
struct bpa10x_data *data = hci_get_drvdata(hdev);
struct usb_ctrlrequest *dr;
struct urb *urb;
unsigned int pipe;
Expand Down Expand Up @@ -459,7 +459,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
}

hdev->bus = HCI_USB;
hdev->driver_data = data;
hci_set_drvdata(hdev, data);

data->hdev = hdev;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)

static int bt3c_hci_flush(struct hci_dev *hdev)
{
bt3c_info_t *info = (bt3c_info_t *)(hdev->driver_data);
bt3c_info_t *info = hci_get_drvdata(hdev);

/* Drop TX queue */
skb_queue_purge(&(info->txq));
Expand Down Expand Up @@ -428,7 +428,7 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)
return -ENODEV;
}

info = (bt3c_info_t *) (hdev->driver_data);
info = hci_get_drvdata(hdev);

switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
Expand Down Expand Up @@ -575,7 +575,7 @@ static int bt3c_open(bt3c_info_t *info)
info->hdev = hdev;

hdev->bus = HCI_PCCARD;
hdev->driver_data = info;
hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);

hdev->open = bt3c_hci_open;
Expand Down
26 changes: 12 additions & 14 deletions trunk/drivers/bluetooth/btmrvl_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static const struct file_operations btmrvl_txdnldready_fops = {

void btmrvl_debugfs_init(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
struct btmrvl_private *priv = hci_get_drvdata(hdev);
struct btmrvl_debugfs_data *dbg;

if (!hdev->debugfs)
Expand All @@ -401,36 +401,34 @@ void btmrvl_debugfs_init(struct hci_dev *hdev)
dbg->config_dir = debugfs_create_dir("config", hdev->debugfs);

dbg->psmode = debugfs_create_file("psmode", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_psmode_fops);
priv, &btmrvl_psmode_fops);
dbg->pscmd = debugfs_create_file("pscmd", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_pscmd_fops);
priv, &btmrvl_pscmd_fops);
dbg->gpiogap = debugfs_create_file("gpiogap", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_gpiogap_fops);
priv, &btmrvl_gpiogap_fops);
dbg->hsmode = debugfs_create_file("hsmode", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_hsmode_fops);
priv, &btmrvl_hsmode_fops);
dbg->hscmd = debugfs_create_file("hscmd", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_hscmd_fops);
priv, &btmrvl_hscmd_fops);
dbg->hscfgcmd = debugfs_create_file("hscfgcmd", 0644, dbg->config_dir,
hdev->driver_data, &btmrvl_hscfgcmd_fops);
priv, &btmrvl_hscfgcmd_fops);

dbg->status_dir = debugfs_create_dir("status", hdev->debugfs);
dbg->curpsmode = debugfs_create_file("curpsmode", 0444,
dbg->status_dir,
hdev->driver_data,
&btmrvl_curpsmode_fops);
dbg->status_dir, priv, &btmrvl_curpsmode_fops);
dbg->psstate = debugfs_create_file("psstate", 0444, dbg->status_dir,
hdev->driver_data, &btmrvl_psstate_fops);
priv, &btmrvl_psstate_fops);
dbg->hsstate = debugfs_create_file("hsstate", 0444, dbg->status_dir,
hdev->driver_data, &btmrvl_hsstate_fops);
priv, &btmrvl_hsstate_fops);
dbg->txdnldready = debugfs_create_file("txdnldready", 0444,
dbg->status_dir,
hdev->driver_data,
priv,
&btmrvl_txdnldready_fops);
}

void btmrvl_debugfs_remove(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
struct btmrvl_private *priv = hci_get_drvdata(hdev);
struct btmrvl_debugfs_data *dbg = priv->debugfs_data;

if (!dbg)
Expand Down
11 changes: 6 additions & 5 deletions trunk/drivers/bluetooth/btmrvl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,13 @@ static int btmrvl_send_frame(struct sk_buff *skb)

BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len);

if (!hdev || !hdev->driver_data) {
if (!hdev) {
BT_ERR("Frame for unknown HCI device");
return -ENODEV;
}

priv = (struct btmrvl_private *) hdev->driver_data;
priv = hci_get_drvdata(hdev);

if (!test_bit(HCI_RUNNING, &hdev->flags)) {
BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags);
print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET,
Expand Down Expand Up @@ -430,7 +431,7 @@ static int btmrvl_send_frame(struct sk_buff *skb)

static int btmrvl_flush(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
struct btmrvl_private *priv = hci_get_drvdata(hdev);

skb_queue_purge(&priv->adapter->tx_queue);

Expand All @@ -439,7 +440,7 @@ static int btmrvl_flush(struct hci_dev *hdev)

static int btmrvl_close(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
struct btmrvl_private *priv = hci_get_drvdata(hdev);

if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
return 0;
Expand Down Expand Up @@ -542,7 +543,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
}

priv->btmrvl_dev.hcidev = hdev;
hdev->driver_data = priv;
hci_set_drvdata(hdev, priv);

hdev->bus = HCI_SDIO;
hdev->open = btmrvl_open;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void btsdio_interrupt(struct sdio_func *func)

static int btsdio_open(struct hci_dev *hdev)
{
struct btsdio_data *data = hdev->driver_data;
struct btsdio_data *data = hci_get_drvdata(hdev);
int err;

BT_DBG("%s", hdev->name);
Expand Down Expand Up @@ -225,7 +225,7 @@ static int btsdio_open(struct hci_dev *hdev)

static int btsdio_close(struct hci_dev *hdev)
{
struct btsdio_data *data = hdev->driver_data;
struct btsdio_data *data = hci_get_drvdata(hdev);

BT_DBG("%s", hdev->name);

Expand All @@ -246,7 +246,7 @@ static int btsdio_close(struct hci_dev *hdev)

static int btsdio_flush(struct hci_dev *hdev)
{
struct btsdio_data *data = hdev->driver_data;
struct btsdio_data *data = hci_get_drvdata(hdev);

BT_DBG("%s", hdev->name);

Expand All @@ -258,7 +258,7 @@ static int btsdio_flush(struct hci_dev *hdev)
static int btsdio_send_frame(struct sk_buff *skb)
{
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct btsdio_data *data = hdev->driver_data;
struct btsdio_data *data = hci_get_drvdata(hdev);

BT_DBG("%s", hdev->name);

Expand Down Expand Up @@ -321,7 +321,7 @@ static int btsdio_probe(struct sdio_func *func,
}

hdev->bus = HCI_SDIO;
hdev->driver_data = data;
hci_set_drvdata(hdev, data);

if (id->class == SDIO_CLASS_BT_AMP)
hdev->dev_type = HCI_AMP;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/bluetooth/btuart_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)

static int btuart_hci_flush(struct hci_dev *hdev)
{
btuart_info_t *info = (btuart_info_t *)(hdev->driver_data);
btuart_info_t *info = hci_get_drvdata(hdev);

/* Drop TX queue */
skb_queue_purge(&(info->txq));
Expand Down Expand Up @@ -435,7 +435,7 @@ static int btuart_hci_send_frame(struct sk_buff *skb)
return -ENODEV;
}

info = (btuart_info_t *)(hdev->driver_data);
info = hci_get_drvdata(hdev);

switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
Expand Down Expand Up @@ -493,7 +493,7 @@ static int btuart_open(btuart_info_t *info)
info->hdev = hdev;

hdev->bus = HCI_PCCARD;
hdev->driver_data = info;
hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev);

hdev->open = btuart_hci_open;
Expand Down
Loading

0 comments on commit 26771a7

Please sign in to comment.