Commit 347fd7db authored by Henrik Hautakoski's avatar Henrik Hautakoski Committed by Greg Kroah-Hartman

Staging: rt2860: fixed coding-style issues in pci_main_dev.c

fixed a bunch of coding-style issues generated from checkpatch.pl
Signed-off-by: default avatarHenrik Hautakoski <henrik.hautakoski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8d1fe5ea
...@@ -107,13 +107,13 @@ MODULE_VERSION(STA_DRIVER_VERSION); ...@@ -107,13 +107,13 @@ MODULE_VERSION(STA_DRIVER_VERSION);
/* Our PCI driver structure */ /* Our PCI driver structure */
/* */ /* */
static struct pci_driver rt2860_driver = { static struct pci_driver rt2860_driver = {
name: "rt2860", name: "rt2860",
id_table:rt2860_pci_tbl, id_table : rt2860_pci_tbl,
probe: rt2860_probe, probe : rt2860_probe,
remove:__devexit_p(rt2860_remove_one), remove : __devexit_p(rt2860_remove_one),
#ifdef CONFIG_PM #ifdef CONFIG_PM
suspend:rt2860_suspend, suspend : rt2860_suspend,
resume:rt2860_resume, resume : rt2860_resume,
#endif #endif
}; };
...@@ -211,9 +211,9 @@ static int rt2860_resume(struct pci_dev *pci_dev) ...@@ -211,9 +211,9 @@ static int rt2860_resume(struct pci_dev *pci_dev)
DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_resume()\n")); DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_resume()\n"));
if (net_dev == NULL) { if (net_dev == NULL)
DBGPRINT(RT_DEBUG_ERROR, ("net_dev == NULL!\n")); DBGPRINT(RT_DEBUG_ERROR, ("net_dev == NULL!\n"));
} else else
GET_PAD_FROM_NET_DEV(pAd, net_dev); GET_PAD_FROM_NET_DEV(pAd, net_dev);
if (pAd != NULL) { if (pAd != NULL) {
...@@ -281,7 +281,9 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev, ...@@ -281,7 +281,9 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev,
/*PCIDevInit============================================== */ /*PCIDevInit============================================== */
/* wake up and enable device */ /* wake up and enable device */
if ((rv = pci_enable_device(pci_dev)) != 0) { rv = pci_enable_device(pci_dev);
if (rv != 0) {
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("Enable PCI device failed, errno=%d!\n", rv)); ("Enable PCI device failed, errno=%d!\n", rv));
return rv; return rv;
...@@ -289,7 +291,9 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev, ...@@ -289,7 +291,9 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev,
print_name = (char *)pci_name(pci_dev); print_name = (char *)pci_name(pci_dev);
if ((rv = pci_request_regions(pci_dev, print_name)) != 0) { rv = pci_request_regions(pci_dev, print_name);
if (rv != 0) {
DBGPRINT(RT_DEBUG_ERROR, DBGPRINT(RT_DEBUG_ERROR,
("Request PCI resource failed, errno=%d!\n", rv)); ("Request PCI resource failed, errno=%d!\n", rv));
goto err_out; goto err_out;
...@@ -490,9 +494,8 @@ static void RTMPInitPCIeDevice(struct pci_dev *pci_dev, struct rt_rtmp_adapter * ...@@ -490,9 +494,8 @@ static void RTMPInitPCIeDevice(struct pci_dev *pci_dev, struct rt_rtmp_adapter *
/* Support advanced power save after 2892/2790. */ /* Support advanced power save after 2892/2790. */
/* MAC version at offset 0x1000 is 0x2872XXXX/0x2870XXXX(PCIe, USB, SDIO). */ /* MAC version at offset 0x1000 is 0x2872XXXX/0x2870XXXX(PCIe, USB, SDIO). */
if ((MacCsr0 & 0xffff0000) != 0x28600000) { if ((MacCsr0 & 0xffff0000) != 0x28600000)
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PCIE_DEVICE); OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PCIE_DEVICE);
}
} }
} }
...@@ -900,9 +903,9 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level) ...@@ -900,9 +903,9 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level)
if ((Configuration != 0) && (Configuration != 0xFFFF)) { if ((Configuration != 0) && (Configuration != 0xFFFF)) {
Configuration &= 0xfefc; Configuration &= 0xfefc;
/* If call from interface down, restore to orginial setting. */ /* If call from interface down, restore to orginial setting. */
if (Level == RESTORE_CLOSE) { if (Level == RESTORE_CLOSE)
Configuration |= pAd->HostLnkCtrlConfiguration; Configuration |= pAd->HostLnkCtrlConfiguration;
} else else
Configuration |= 0x0; Configuration |= 0x0;
PCI_REG_WIRTE_WORD(pObj->parent_pci_dev, PCI_REG_WIRTE_WORD(pObj->parent_pci_dev,
pAd->HostLnkCtrlOffset, pAd->HostLnkCtrlOffset,
...@@ -1100,13 +1103,13 @@ void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd) ...@@ -1100,13 +1103,13 @@ void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd)
/* Find PCI-to-PCI Bridge Express Capability Offset */ /* Find PCI-to-PCI Bridge Express Capability Offset */
pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP); pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP);
if (pos != 0) { if (pos != 0)
pAd->HostLnkCtrlOffset = pos + PCI_EXP_LNKCTL; pAd->HostLnkCtrlOffset = pos + PCI_EXP_LNKCTL;
}
/* If configurared to turn on L1. */ /* If configurared to turn on L1. */
HostConfiguration = 0; HostConfiguration = 0;
if (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1) { if (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1) {
DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM \n")); DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM\n"));
/* Skip non-exist deice right away */ /* Skip non-exist deice right away */
if ((pAd->HostLnkCtrlOffset != 0)) { if ((pAd->HostLnkCtrlOffset != 0)) {
......
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