X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fhvc_iseries.c;h=f144a947bd17aaa8549230e307c13def30296822;hb=5a96c5d0c58ead9a0ece03ffe1c116dea6dafe9c;hp=256afc8e583825ced0bc060f4c9fba85c09ff65a;hpb=8bff05b052db7a4cfaaf0eee7f8145600548e9c9;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index 256afc8e583..f144a947bd1 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -153,9 +154,7 @@ static int put_chars(uint32_t vtermno, const char *buf, int count) spin_lock_irqsave(&consolelock, flags); if (viochar_is_console(pi) && !viopath_isactive(pi->lp)) { - spin_lock_irqsave(&consoleloglock, flags); HvCall_writeLogBuffer(buf, count); - spin_unlock_irqrestore(&consoleloglock, flags); sent = count; goto done; } @@ -171,11 +170,8 @@ static int put_chars(uint32_t vtermno, const char *buf, int count) len = (count > VIOCHAR_MAX_DATA) ? VIOCHAR_MAX_DATA : count; - if (viochar_is_console(pi)) { - spin_lock_irqsave(&consoleloglock, flags); + if (viochar_is_console(pi)) HvCall_writeLogBuffer(buf, len); - spin_unlock_irqrestore(&consoleloglock, flags); - } init_data_event(viochar, pi->lp); @@ -221,7 +217,8 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev, pi = &port_info[vdev->unit_address]; - hp = hvc_alloc(vdev->unit_address, vdev->irq, &hvc_get_put_ops); + hp = hvc_alloc(vdev->unit_address, vdev->irq, &hvc_get_put_ops, + VIOCHAR_MAX_DATA); if (IS_ERR(hp)) return PTR_ERR(hp); pi->hp = hp; @@ -492,6 +489,9 @@ static int hvc_vio_init(void) atomic_t wait_flag; int rc; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -EIO; + /* +2 for fudge */ rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), viomajorsubtype_chario, VIOCHAR_WINDOW + 2); @@ -566,7 +566,7 @@ static int hvc_find_vtys(void) for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL; vty = of_find_node_by_name(vty, "vty")) { - uint32_t *vtermno; + const uint32_t *vtermno; /* We have statically defined space for only a certain number * of console adapters. @@ -575,7 +575,7 @@ static int hvc_find_vtys(void) (num_found >= VTTY_PORTS)) break; - vtermno = (uint32_t *)get_property(vty, "reg", NULL); + vtermno = get_property(vty, "reg", NULL); if (!vtermno) continue;