locks: allow lockd to process blocked locks during grace period
[safe/jmp/linux-2.6] / drivers / char / hvc_vio.c
index 9add81c..93f3840 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/hvconsole.h>
 #include <asm/vio.h>
 #include <asm/prom.h>
+#include <asm/firmware.h>
 
 #include "hvc_console.h"
 
@@ -79,6 +80,8 @@ static int filtered_get_chars(uint32_t vtermno, char *buf, int count)
 static struct hv_ops hvc_get_put_ops = {
        .get_chars = filtered_get_chars,
        .put_chars = hvc_put_chars,
+       .notifier_add = notifier_add_irq,
+       .notifier_del = notifier_del_irq,
 };
 
 static int __devinit hvc_vio_probe(struct vio_dev *vdev,
@@ -90,7 +93,8 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev,
        if (!vdev || !id)
                return -EPERM;
 
-       hp = hvc_alloc(vdev->unit_address, vdev->irq, &hvc_get_put_ops);
+       hp = hvc_alloc(vdev->unit_address, vdev->irq, &hvc_get_put_ops,
+                       MAX_VIO_PUT_CHARS);
        if (IS_ERR(hp))
                return PTR_ERR(hp);
        dev_set_drvdata(&vdev->dev, hp);
@@ -119,6 +123,9 @@ static int hvc_vio_init(void)
 {
        int rc;
 
+       if (firmware_has_feature(FW_FEATURE_ISERIES))
+               return -EIO;
+
        /* Register as a vio device to receive callbacks */
        rc = vio_register_driver(&hvc_vio_driver);
 
@@ -140,7 +147,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.
@@ -148,11 +155,11 @@ static int hvc_find_vtys(void)
                if (num_found >= MAX_NR_HVC_CONSOLES)
                        break;
 
-               vtermno = (uint32_t *)get_property(vty, "reg", NULL);
+               vtermno = of_get_property(vty, "reg", NULL);
                if (!vtermno)
                        continue;
 
-               if (device_is_compatible(vty, "hvterm1")) {
+               if (of_device_is_compatible(vty, "hvterm1")) {
                        hvc_instantiate(*vtermno, num_found, &hvc_get_put_ops);
                        ++num_found;
                }