enic: move struct definition from .c to .h file
authorGovindarajulu Varadarajan <_govind@gmx.com>
Sat, 15 Aug 2015 20:14:51 +0000 (01:44 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Aug 2015 22:25:29 +0000 (15:25 -0700)
Some of the structure definitions are in .c file to make them private to
that file. This patch moves the struct definition to .h file, So that their
definitions are accessible from other files.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/vnic_dev.c
drivers/net/ethernet/cisco/enic/vnic_dev.h

index 62f7b7baf93cd79f77de9aceb8d977461c075cb7..b239cfddc2744468c1b6391f2a13b6aaf5790c67 100644 (file)
 #include "vnic_dev.h"
 #include "vnic_stats.h"
 
-enum vnic_proxy_type {
-       PROXY_NONE,
-       PROXY_BY_BDF,
-       PROXY_BY_INDEX,
-};
-
-struct vnic_res {
-       void __iomem *vaddr;
-       dma_addr_t bus_addr;
-       unsigned int count;
-};
-
-struct vnic_intr_coal_timer_info {
-       u32 mul;
-       u32 div;
-       u32 max_usec;
-};
-
-struct vnic_dev {
-       void *priv;
-       struct pci_dev *pdev;
-       struct vnic_res res[RES_TYPE_MAX];
-       enum vnic_dev_intr_mode intr_mode;
-       struct vnic_devcmd __iomem *devcmd;
-       struct vnic_devcmd_notify *notify;
-       struct vnic_devcmd_notify notify_copy;
-       dma_addr_t notify_pa;
-       u32 notify_sz;
-       dma_addr_t linkstatus_pa;
-       struct vnic_stats *stats;
-       dma_addr_t stats_pa;
-       struct vnic_devcmd_fw_info *fw_info;
-       dma_addr_t fw_info_pa;
-       enum vnic_proxy_type proxy;
-       u32 proxy_index;
-       u64 args[VNIC_DEVCMD_NARGS];
-       struct vnic_intr_coal_timer_info intr_coal_timer_info;
-};
-
 #define VNIC_MAX_RES_HDR_SIZE \
        (sizeof(struct vnic_resource_header) + \
        sizeof(struct vnic_resource) * RES_TYPE_MAX)
index 1fb214efcebaf0bb959dc62a0871f792cd2b4e43..90bca09a15531d0c05af47ad4571f5c4ce08c9f8 100644 (file)
@@ -70,7 +70,45 @@ struct vnic_dev_ring {
        unsigned int desc_avail;
 };
 
-struct vnic_dev;
+enum vnic_proxy_type {
+       PROXY_NONE,
+       PROXY_BY_BDF,
+       PROXY_BY_INDEX,
+};
+
+struct vnic_res {
+       void __iomem *vaddr;
+       dma_addr_t bus_addr;
+       unsigned int count;
+};
+
+struct vnic_intr_coal_timer_info {
+       u32 mul;
+       u32 div;
+       u32 max_usec;
+};
+
+struct vnic_dev {
+       void *priv;
+       struct pci_dev *pdev;
+       struct vnic_res res[RES_TYPE_MAX];
+       enum vnic_dev_intr_mode intr_mode;
+       struct vnic_devcmd __iomem *devcmd;
+       struct vnic_devcmd_notify *notify;
+       struct vnic_devcmd_notify notify_copy;
+       dma_addr_t notify_pa;
+       u32 notify_sz;
+       dma_addr_t linkstatus_pa;
+       struct vnic_stats *stats;
+       dma_addr_t stats_pa;
+       struct vnic_devcmd_fw_info *fw_info;
+       dma_addr_t fw_info_pa;
+       enum vnic_proxy_type proxy;
+       u32 proxy_index;
+       u64 args[VNIC_DEVCMD_NARGS];
+       struct vnic_intr_coal_timer_info intr_coal_timer_info;
+};
+
 struct vnic_stats;
 
 void *vnic_dev_priv(struct vnic_dev *vdev);