]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: brcm80211: remove unused attributes from struct osl_info
authorArend van Spriel <arend@broadcom.com>
Wed, 2 Mar 2011 20:18:43 +0000 (21:18 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Mar 2011 00:48:04 +0000 (19:48 -0500)
Getting rid of the whole osl concept soon this removes most fields
in struct osl_info. Turned out hnddma.c was still using it so this
was fixed and now it gets pointer to bus device from si_info which
it only needs in the attach function for this purpose so reference
to it does not need to be kept. Two unused functions referencing
the removed fields in linux_osl.c also were removed.

Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/include/osl.h
drivers/staging/brcm80211/include/siutils.h
drivers/staging/brcm80211/util/hnddma.c
drivers/staging/brcm80211/util/linux_osl.c

index 51619629b5848d7959b8b5d60bb9fc6331e6b986..02faf30372a3efe0c4fe9a962d437a9942daaf5b 100644 (file)
 /* osl handle type forward declaration */
 struct osl_info {
        uint pktalloced;        /* Number of allocated packet buffers */
-       bool mmbus;             /* Bus supports memory-mapped registers */
        uint magic;
-       void *pdev;
-       uint bustype;
 };
 
 typedef struct osl_dmainfo osldma_t;
index f84057ed6b71ec903f1c9efd9cc7b6c954444a25..a95e9255b47c5aa354b1792cbdd58e7a992580c0 100644 (file)
@@ -249,7 +249,7 @@ typedef struct si_info {
        u32 oob_router; /* oob router registers for axi */
 } si_info_t;
 
-#define        SI_INFO(sih)    (si_info_t *)sih
+#define        SI_INFO(sih)    ((si_info_t *)(sih))
 
 #define        GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
                IS_ALIGNED((x), SI_CORE_SIZE))
index b7bc84d62c387334692f500e7042159a62a6af94..01d4b274520b0fba8e386fc55fe6cc66a082a556 100644 (file)
@@ -82,7 +82,6 @@ typedef struct dma_info {
 
        struct osl_info *osh;   /* os handle */
        void *pbus;             /* bus handle */
-       si_t *sih;              /* sb handle */
 
        bool dma64;             /* this dma engine is operating in 64-bit mode */
        bool addrext;           /* this dma engine supports DmaExtendedAddrChanges */
@@ -338,8 +337,7 @@ struct hnddma_pub *dma_attach(struct osl_info *osh, char *name, si_t *sih,
        di->name[MAXNAMEL - 1] = '\0';
 
        di->osh = osh;
-       di->sih = sih;
-       di->pbus = osh->pdev;
+       di->pbus = ((struct si_info *)sih)->pbus;
 
        /* save tunables */
        di->ntxd = (u16) ntxd;
index 99e449603a9fbd10bea832cd5ecd97f5661ecb3c..70c35e9d31a8ec5050f4dc5ff5151dbc3132d660 100644 (file)
@@ -43,29 +43,7 @@ struct osl_info *osl_attach(void *pdev, uint bustype)
        ASSERT(osh);
 
        memset(osh, 0, sizeof(struct osl_info));
-
        osh->magic = OS_HANDLE_MAGIC;
-       osh->pdev = pdev;
-       osh->bustype = bustype;
-
-       switch (bustype) {
-       case PCI_BUS:
-       case SI_BUS:
-       case PCMCIA_BUS:
-               osh->mmbus = true;
-               break;
-       case JTAG_BUS:
-       case SDIO_BUS:
-       case USB_BUS:
-       case SPI_BUS:
-       case RPC_BUS:
-               osh->mmbus = false;
-               break;
-       default:
-               ASSERT(false);
-               break;
-       }
-
        return osh;
 }
 
@@ -78,22 +56,6 @@ void osl_detach(struct osl_info *osh)
        kfree(osh);
 }
 
-/* return bus # for the pci device pointed by osh->pdev */
-uint osl_pci_bus(struct osl_info *osh)
-{
-       ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev);
-
-       return ((struct pci_dev *)osh->pdev)->bus->number;
-}
-
-/* return slot # for the pci device pointed by osh->pdev */
-uint osl_pci_slot(struct osl_info *osh)
-{
-       ASSERT(osh && (osh->magic == OS_HANDLE_MAGIC) && osh->pdev);
-
-       return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn);
-}
-
 #if defined(BCMDBG_ASSERT)
 void osl_assert(char *exp, char *file, int line)
 {