Skip to content

Commit

Permalink
Staging: ipack/bridges/tpci200: fix the uninstall the ipack device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Iglesias Gonsálvez authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent b442bf7 commit 7273b88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ipack/bridges/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7273b88

Please sign in to comment.