diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-08 15:04:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:19 -0500 |
commit | aa21c004f80bdf943736c62dccf0c0398d7824f3 (patch) | |
tree | 6815328775d3b5ec46bb342c4c256cde0f223863 /drivers/net/wireless/libertas/if_cs.c | |
parent | f86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 (diff) |
libertas: kill struct lbs_adapter
There seems to be no reason for a separate structure; move it all
into struct lbs_private.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_cs.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 8508260a286b..49a01780dd03 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -255,7 +255,7 @@ static irqreturn_t if_cs_interrupt(int irq, void *data) | |||
255 | 255 | ||
256 | } else if (int_cause == 0xffff) { | 256 | } else if (int_cause == 0xffff) { |
257 | /* Read in junk, the card has probably been removed */ | 257 | /* Read in junk, the card has probably been removed */ |
258 | card->priv->adapter->surpriseremoved = 1; | 258 | card->priv->surpriseremoved = 1; |
259 | 259 | ||
260 | } else { | 260 | } else { |
261 | if (int_cause & IF_CS_H_IC_TX_OVER) | 261 | if (int_cause & IF_CS_H_IC_TX_OVER) |
@@ -644,7 +644,6 @@ static int if_cs_host_to_card(struct lbs_private *priv, | |||
644 | static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg) | 644 | static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg) |
645 | { | 645 | { |
646 | struct if_cs_card *card = (struct if_cs_card *)priv->card; | 646 | struct if_cs_card *card = (struct if_cs_card *)priv->card; |
647 | /* struct lbs_adapter *adapter = priv->adapter; */ | ||
648 | int ret = 0; | 647 | int ret = 0; |
649 | u16 int_cause; | 648 | u16 int_cause; |
650 | u8 *cmdbuf; | 649 | u8 *cmdbuf; |
@@ -652,7 +651,7 @@ static int if_cs_get_int_status(struct lbs_private *priv, u8 *ireg) | |||
652 | 651 | ||
653 | lbs_deb_enter(LBS_DEB_CS); | 652 | lbs_deb_enter(LBS_DEB_CS); |
654 | 653 | ||
655 | if (priv->adapter->surpriseremoved) | 654 | if (priv->surpriseremoved) |
656 | goto out; | 655 | goto out; |
657 | 656 | ||
658 | int_cause = if_cs_read16(card, IF_CS_C_INT_CAUSE) & IF_CS_C_IC_MASK; | 657 | int_cause = if_cs_read16(card, IF_CS_C_INT_CAUSE) & IF_CS_C_IC_MASK; |
@@ -678,22 +677,22 @@ sbi_get_int_status_exit: | |||
678 | 677 | ||
679 | /* Card has a command result for us */ | 678 | /* Card has a command result for us */ |
680 | if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { | 679 | if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { |
681 | spin_lock(&priv->adapter->driver_lock); | 680 | spin_lock(&priv->driver_lock); |
682 | if (!priv->adapter->cur_cmd) { | 681 | if (!priv->cur_cmd) { |
683 | cmdbuf = priv->upld_buf; | 682 | cmdbuf = priv->upld_buf; |
684 | priv->adapter->hisregcpy &= ~IF_CS_C_S_RX_UPLD_RDY; | 683 | priv->hisregcpy &= ~IF_CS_C_S_RX_UPLD_RDY; |
685 | } else { | 684 | } else { |
686 | cmdbuf = priv->adapter->cur_cmd->bufvirtualaddr; | 685 | cmdbuf = priv->cur_cmd->bufvirtualaddr; |
687 | } | 686 | } |
688 | 687 | ||
689 | ret = if_cs_receive_cmdres(priv, cmdbuf, &priv->upld_len); | 688 | ret = if_cs_receive_cmdres(priv, cmdbuf, &priv->upld_len); |
690 | spin_unlock(&priv->adapter->driver_lock); | 689 | spin_unlock(&priv->driver_lock); |
691 | if (ret < 0) | 690 | if (ret < 0) |
692 | lbs_pr_err("could not receive cmd from card\n"); | 691 | lbs_pr_err("could not receive cmd from card\n"); |
693 | } | 692 | } |
694 | 693 | ||
695 | out: | 694 | out: |
696 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d, ireg 0x%x, hisregcpy 0x%x", ret, *ireg, priv->adapter->hisregcpy); | 695 | lbs_deb_leave_args(LBS_DEB_CS, "ret %d, ireg 0x%x, hisregcpy 0x%x", ret, *ireg, priv->hisregcpy); |
697 | return ret; | 696 | return ret; |
698 | } | 697 | } |
699 | 698 | ||
@@ -702,7 +701,7 @@ static int if_cs_read_event_cause(struct lbs_private *priv) | |||
702 | { | 701 | { |
703 | lbs_deb_enter(LBS_DEB_CS); | 702 | lbs_deb_enter(LBS_DEB_CS); |
704 | 703 | ||
705 | priv->adapter->eventcause = (if_cs_read16(priv->card, IF_CS_C_STATUS) & IF_CS_C_S_STATUS_MASK) >> 5; | 704 | priv->eventcause = (if_cs_read16(priv->card, IF_CS_C_STATUS) & IF_CS_C_S_STATUS_MASK) >> 5; |
706 | if_cs_write16(priv->card, IF_CS_H_INT_CAUSE, IF_CS_H_IC_HOST_EVENT); | 705 | if_cs_write16(priv->card, IF_CS_H_INT_CAUSE, IF_CS_H_IC_HOST_EVENT); |
707 | 706 | ||
708 | return 0; | 707 | return 0; |
@@ -869,7 +868,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
869 | priv->hw_get_int_status = if_cs_get_int_status; | 868 | priv->hw_get_int_status = if_cs_get_int_status; |
870 | priv->hw_read_event_cause = if_cs_read_event_cause; | 869 | priv->hw_read_event_cause = if_cs_read_event_cause; |
871 | 870 | ||
872 | priv->adapter->fw_ready = 1; | 871 | priv->fw_ready = 1; |
873 | 872 | ||
874 | /* Now actually get the IRQ */ | 873 | /* Now actually get the IRQ */ |
875 | ret = request_irq(p_dev->irq.AssignedIRQ, if_cs_interrupt, | 874 | ret = request_irq(p_dev->irq.AssignedIRQ, if_cs_interrupt, |