lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Sep 2012 10:51:51 +0200
From:	Samuel Iglesias Gonsálvez 
	<siglesias@...lia.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	industrypack-devel@...ts.sourceforge.net,
	Samuel Iglesias Gonsálvez 
	<siglesias@...lia.com>
Subject: [PATCH 13/20] Staging: ipack/bridges/tpci200: fix the uninstall the ipack device

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@...lia.com>
---
 drivers/staging/ipack/bridges/tpci200.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index c1ce311..293456b 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -30,8 +30,6 @@ static u16 tpci200_status_error[] = {
 
 static struct ipack_bus_ops tpci200_bus_ops;
 
-static int tpci200_slot_unregister(struct ipack_device *dev);
-
 static struct tpci200_board *check_slot(struct ipack_device *dev)
 {
 	struct tpci200_board *tpci200;
@@ -387,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;
@@ -616,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);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ