summaryrefslogtreecommitdiff
path: root/src/devices/pnp_device.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-11-04 23:23:47 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-11-04 23:23:47 +0000
commite4870474b9026ad6b2ccabe59a8623e28722007f (patch)
tree45905ef12a2941f731e3ea74f1e55e197556c0a7 /src/devices/pnp_device.c
parent305e8861d66b050a3e35133603acce69324349fe (diff)
Various cosmetic and coding style fixes in src/devices.
Also: - Improve a few code comments, fix typos, etc. - Change a few more variable types to u8/u16/u32 etc. - Make some very long lines fit into 80chars/line. - Drop a huge duplicated comment, use "@see" to refer to the other one. - Reduce nesting level a bit by restructuring some code chunks. - s/Config.lb/devicetree.cb/ in a few places. Abuild-tested. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6019 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pnp_device.c')
-rw-r--r--src/devices/pnp_device.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c
index 702aa9253c..b2bca03232 100644
--- a/src/devices/pnp_device.c
+++ b/src/devices/pnp_device.c
@@ -163,7 +163,7 @@ struct device_operations pnp_ops = {
.enable = pnp_enable,
};
-/* PNP chip opertations */
+/* PNP chip operations */
static void pnp_get_ioresource(device_t dev, u8 index, struct io_info *info)
{
@@ -214,18 +214,15 @@ static void get_resources(device_t dev, struct pnp_info *info)
{
struct resource *resource;
- if (info->flags & PNP_IO0) {
+ if (info->flags & PNP_IO0)
pnp_get_ioresource(dev, PNP_IDX_IO0, &info->io0);
- }
- if (info->flags & PNP_IO1) {
+ if (info->flags & PNP_IO1)
pnp_get_ioresource(dev, PNP_IDX_IO1, &info->io1);
- }
- if (info->flags & PNP_IO2) {
+ if (info->flags & PNP_IO2)
pnp_get_ioresource(dev, PNP_IDX_IO2, &info->io2);
- }
- if (info->flags & PNP_IO3) {
+ if (info->flags & PNP_IO3)
pnp_get_ioresource(dev, PNP_IDX_IO3, &info->io3);
- }
+
if (info->flags & PNP_IRQ0) {
resource = new_resource(dev, PNP_IDX_IRQ0);
resource->size = 1;
@@ -236,6 +233,7 @@ static void get_resources(device_t dev, struct pnp_info *info)
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}
+
if (info->flags & PNP_DRQ0) {
resource = new_resource(dev, PNP_IDX_DRQ0);
resource->size = 1;