]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: uart: tie into gb core properly
authorGreg Kroah-Hartman <greg@kroah.com>
Sat, 30 Aug 2014 23:54:05 +0000 (16:54 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Sat, 30 Aug 2014 23:54:05 +0000 (16:54 -0700)
drivers/staging/greybus/uart-gb.c

index cdb4a824f2537b40cddb8aa8f29cb210aade9c2c..377ad38460204a220ff04ef68433656f26bbb01c 100644 (file)
@@ -412,7 +412,7 @@ int gb_tty_probe(struct greybus_device *gdev,
 
        /* FIXME - allocate gb buffers */
 
-       greybus_set_drvdata(gdev, gb_tty);
+       gdev->gb_tty = gb_tty;
 
        tty_dev = tty_port_register_device(&gb_tty->port, gb_tty_driver, minor,
                                           &gdev->dev);
@@ -423,14 +423,14 @@ int gb_tty_probe(struct greybus_device *gdev,
 
        return 0;
 error:
-       greybus_set_drvdata(gdev, NULL);
+       gdev->gb_tty = NULL;
        release_minor(gb_tty);
        return retval;
 }
 
 void gb_tty_disconnect(struct greybus_device *gdev)
 {
-       struct gb_tty *gb_tty = greybus_get_drvdata(gdev);
+       struct gb_tty *gb_tty = gdev->gb_tty;
        struct tty_struct *tty;
 
        if (!gb_tty)
@@ -440,7 +440,7 @@ void gb_tty_disconnect(struct greybus_device *gdev)
        gb_tty->disconnected = true;
 
        wake_up_all(&gb_tty->wioctl);
-       greybus_set_drvdata(gdev, NULL);
+       gdev->gb_tty = NULL;
        mutex_unlock(&gb_tty->mutex);
 
        tty = tty_port_tty_get(&gb_tty->port);