diff options
author | Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> | 2007-01-17 23:50:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:50:06 -0500 |
commit | c54c18790700b8b2a503945d729aa425c25691fe (patch) | |
tree | 90061bba5831aa5112afb08fc2fc89f32582078b | |
parent | 8255cf35d503db7c1b26ae53b6b7f23ada82316f (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>
-rw-r--r-- | drivers/pci/msi.c | 9 | ||||
-rw-r--r-- | include/linux/msi.h | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index ed3f7e1a563c..e87e8efb9bb4 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) | |||
49 | switch (entry->msi_attrib.type) { | 49 | switch (entry->msi_attrib.type) { |
50 | case PCI_CAP_ID_MSI: | 50 | case PCI_CAP_ID_MSI: |
51 | if (entry->msi_attrib.maskbit) { | 51 | if (entry->msi_attrib.maskbit) { |
52 | int pos; | 52 | int pos; |
53 | u32 mask_bits; | 53 | u32 mask_bits; |
54 | 54 | ||
55 | pos = (long)entry->mask_base; | 55 | pos = (long)entry->mask_base; |
56 | pci_read_config_dword(entry->dev, pos, &mask_bits); | 56 | pci_read_config_dword(entry->dev, pos, &mask_bits); |
@@ -162,6 +162,7 @@ void unmask_msi_irq(unsigned int irq) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | static int msi_free_irq(struct pci_dev* dev, int irq); | 164 | static int msi_free_irq(struct pci_dev* dev, int irq); |
165 | |||
165 | static int msi_init(void) | 166 | static int msi_init(void) |
166 | { | 167 | { |
167 | static int status = -ENOMEM; | 168 | static int status = -ENOMEM; |
@@ -291,7 +292,7 @@ static int msi_lookup_irq(struct pci_dev *dev, int type) | |||
291 | continue; | 292 | continue; |
292 | spin_unlock_irqrestore(&msi_lock, flags); | 293 | spin_unlock_irqrestore(&msi_lock, flags); |
293 | /* This pre-assigned MSI irq for this device | 294 | /* This pre-assigned MSI irq for this device |
294 | already exits. Override dev->irq with this irq */ | 295 | already exists. Override dev->irq with this irq */ |
295 | dev->irq = irq; | 296 | dev->irq = irq; |
296 | return 0; | 297 | return 0; |
297 | } | 298 | } |
@@ -458,7 +459,7 @@ void pci_restore_msix_state(struct pci_dev *dev) | |||
458 | pci_write_config_word(dev, msi_control_reg(pos), save); | 459 | pci_write_config_word(dev, msi_control_reg(pos), save); |
459 | enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX); | 460 | enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX); |
460 | } | 461 | } |
461 | #endif | 462 | #endif /* CONFIG_PM */ |
462 | 463 | ||
463 | /** | 464 | /** |
464 | * msi_capability_init - configure device's MSI capability structure | 465 | * msi_capability_init - configure device's MSI capability structure |
diff --git a/include/linux/msi.h b/include/linux/msi.h index c7ef94343673..b99976b1536e 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -7,11 +7,10 @@ struct msi_msg { | |||
7 | u32 data; /* 16 bits of msi message data */ | 7 | u32 data; /* 16 bits of msi message data */ |
8 | }; | 8 | }; |
9 | 9 | ||
10 | /* Heper functions */ | 10 | /* Helper functions */ |
11 | extern void mask_msi_irq(unsigned int irq); | 11 | extern void mask_msi_irq(unsigned int irq); |
12 | extern void unmask_msi_irq(unsigned int irq); | 12 | extern void unmask_msi_irq(unsigned int irq); |
13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
14 | |||
15 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 14 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
16 | 15 | ||
17 | struct msi_desc { | 16 | struct msi_desc { |