]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Staging: ipack/bridges/tpci200: fix the uninstall the ipack device
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 11 Sep 2012 11:35:06 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Sep 2012 19:18:11 +0000 (12:18 -0700)
Using the call to the ipack_device_unregister() function to avoid the
strange way it was doing, as the device model will take care of calling
the bus's .remove function when a device is being unregistered.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/bridges/tpci200.c

index b92814067061f7c96df15351885d0b2ce8353b00..77e6392fee082ad523ef186ecd6e40e1eede2551 100644 (file)
@@ -385,7 +385,6 @@ static int tpci200_slot_unregister(struct ipack_device *dev)
                return -ERESTARTSYS;
 
        tpci200->slots[dev->slot].dev = NULL;
-       ipack_device_unregister(dev);
        mutex_unlock(&tpci200->mutex);
 
        return 0;
@@ -614,7 +613,7 @@ static void tpci200_uninstall(struct tpci200_board *tpci200)
        int i;
 
        for (i = 0; i < TPCI200_NB_SLOT; i++)
-               tpci200_slot_unregister(tpci200->slots[i].dev);
+               ipack_device_unregister(tpci200->slots[i].dev);
 
        tpci200_unregister(tpci200);
        kfree(tpci200->slots);