summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2007-01-18 13:50:05 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 15:50:06 -0800
commitc54c18790700b8b2a503945d729aa425c25691fe (patch)
tree90061bba5831aa5112afb08fc2fc89f32582078b /drivers/pci
parent8255cf35d503db7c1b26ae53b6b7f23ada82316f (diff)
PCI: cleanup MSI code
Cleanup MSI code as follows: - fix some types - fix strange local variable definition - delete unnecessary blank line - add comment to #endif which is far from corresponding #ifdef Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index ed3f7e1a563..e87e8efb9bb 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -49,8 +49,8 @@ static void msi_set_mask_bit(unsigned int irq, int flag)
switch (entry->msi_attrib.type) {
case PCI_CAP_ID_MSI:
if (entry->msi_attrib.maskbit) {
- int pos;
- u32 mask_bits;
+ int pos;
+ u32 mask_bits;
pos = (long)entry->mask_base;
pci_read_config_dword(entry->dev, pos, &mask_bits);
@@ -162,6 +162,7 @@ void unmask_msi_irq(unsigned int irq)
}
static int msi_free_irq(struct pci_dev* dev, int irq);
+
static int msi_init(void)
{
static int status = -ENOMEM;
@@ -291,7 +292,7 @@ static int msi_lookup_irq(struct pci_dev *dev, int type)
continue;
spin_unlock_irqrestore(&msi_lock, flags);
/* This pre-assigned MSI irq for this device
- already exits. Override dev->irq with this irq */
+ already exists. Override dev->irq with this irq */
dev->irq = irq;
return 0;
}
@@ -458,7 +459,7 @@ void pci_restore_msix_state(struct pci_dev *dev)
pci_write_config_word(dev, msi_control_reg(pos), save);
enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
}
-#endif
+#endif /* CONFIG_PM */
/**
* msi_capability_init - configure device's MSI capability structure