Staging: ipack/devices/ipoctal: Unmap memory on device removal.
authorJens Taprogge <jens.taprogge@taprogge.org>
Wed, 12 Sep 2012 12:55:45 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2012 16:56:02 +0000 (09:56 -0700)
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/devices/ipoctal.c

index 4f79fad7598d2e9688217ed33ce706c34f204ab6..02923643316e073c65cbd9a0cde77df2cf109b4b 100644 (file)
@@ -734,6 +734,9 @@ static void __ipoctal_remove(struct ipoctal *ipoctal)
 
        tty_unregister_driver(ipoctal->tty_drv);
        put_tty_driver(ipoctal->tty_drv);
+       ipoctal->dev->bus->ops->unmap_space(ipoctal->dev, IPACK_MEM_SPACE);
+       ipoctal->dev->bus->ops->unmap_space(ipoctal->dev, IPACK_IO_SPACE);
+       ipoctal->dev->bus->ops->unmap_space(ipoctal->dev, IPACK_ID_SPACE);
        kfree(ipoctal);
 }