Commit 43e79c0f authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: dead code remove device_nics variable

The module can not load more than once.

Remove device_nics, MAX_UINTS and OPTION_DEFAULT

Remove dead index variable from device_get_options
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33cfce64
...@@ -67,9 +67,6 @@ struct _version { ...@@ -67,9 +67,6 @@ struct _version {
#define PKT_BUF_SZ 2390 #define PKT_BUF_SZ 2390
#define MAX_UINTS 8
#define OPTION_DEFAULT { [0 ... MAX_UINTS-1] = -1}
typedef enum _chip_type { typedef enum _chip_type {
VT3253 = 1 VT3253 = 1
} CHIP_TYPE, *PCHIP_TYPE; } CHIP_TYPE, *PCHIP_TYPE;
......
...@@ -245,9 +245,6 @@ DEVICE_PARAM(bDiversityANTEnable, "ANT diversity mode"); ...@@ -245,9 +245,6 @@ DEVICE_PARAM(bDiversityANTEnable, "ANT diversity mode");
// //
// Static vars definitions // Static vars definitions
// //
static int device_nics = 0;
static CHIP_INFO chip_info_table[] = { static CHIP_INFO chip_info_table[] = {
{ VT3253, "VIA Networking Solomon-A/B/G Wireless LAN Adapter ", { VT3253, "VIA Networking Solomon-A/B/G Wireless LAN Adapter ",
256, 1, DEVICE_FLAGS_IP_ALIGN|DEVICE_FLAGS_TX_ALIGN }, 256, 1, DEVICE_FLAGS_IP_ALIGN|DEVICE_FLAGS_TX_ALIGN },
...@@ -336,7 +333,7 @@ static void vt6655_remove(struct pci_dev *pcid) ...@@ -336,7 +333,7 @@ static void vt6655_remove(struct pci_dev *pcid)
} }
static void device_get_options(struct vnt_private *pDevice, static void device_get_options(struct vnt_private *pDevice,
int index, char *devname) char *devname)
{ {
POPTIONS pOpts = &(pDevice->sOpts); POPTIONS pOpts = &(pDevice->sOpts);
...@@ -825,11 +822,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -825,11 +822,6 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
struct vnt_private *pDevice; struct vnt_private *pDevice;
int rc; int rc;
if (device_nics++ >= MAX_UINTS) {
pr_notice(DEVICE_NAME ": already found %d NICs\n", device_nics);
return -ENODEV;
}
dev = alloc_etherdev(sizeof(*pDevice)); dev = alloc_etherdev(sizeof(*pDevice));
pDevice = netdev_priv(dev); pDevice = netdev_priv(dev);
...@@ -934,7 +926,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -934,7 +926,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
MACvInitialize(pDevice->PortOffset); MACvInitialize(pDevice->PortOffset);
MACvReadEtherAddress(pDevice->PortOffset, dev->dev_addr); MACvReadEtherAddress(pDevice->PortOffset, dev->dev_addr);
device_get_options(pDevice, device_nics-1, dev->name); device_get_options(pDevice, dev->name);
device_set_options(pDevice); device_set_options(pDevice);
//Mask out the options cannot be set to the chip //Mask out the options cannot be set to the chip
pDevice->sOpts.flags &= pChip_info->flags; pDevice->sOpts.flags &= pChip_info->flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment