From 2f0376a62fd86b331c8711635b4579d28890bcf5 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 10 Nov 2010 23:50:52 +0000 Subject: [PATCH] Moved the unreserve_device() from ali_terminate() to uninit_driver(), to keep consistency between drivers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39402 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/audio/ac97/ali5451/driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/drivers/audio/ac97/ali5451/driver.c b/src/add-ons/kernel/drivers/audio/ac97/ali5451/driver.c index 0d367b0560..70c2ef8a0c 100644 --- a/src/add-ons/kernel/drivers/audio/ac97/ali5451/driver.c +++ b/src/add-ons/kernel/drivers/audio/ac97/ali5451/driver.c @@ -271,9 +271,6 @@ ali_terminate(ali_dev *card) delete_sem(card->sem_buf_ready); hardware_terminate(card); - - (*gPCI->unreserve_device)(card->info.bus, card->info.device, - card->info.function, DRIVER_NAME, card); } @@ -418,8 +415,11 @@ uninit_driver(void) { int32 i = gCardsCount; - while (i--) + while (i--) { ali_terminate(&gCards[i]); + (*gPCI->unreserve_device)(gCards[i].info.bus, gCards[i].info.device, + gCards[i].info.function, DRIVER_NAME, &gCards[i]); + } memset(&gCards, 0, sizeof(gCards)); put_module(B_PCI_MODULE_NAME);