Skip to contentSkip to conversation

s390: use klist in qeth driver

PATCH New Frank Pavlic 1 participant 1 message Jul 28, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: use klist in qeth driver

[patch 1/1] s390: use klist in qeth driver.

From: Cornelia Huck <[email protected]>
From: Martin Schwidesky <[email protected]>

Convert qeth to the new klist interface and make it compiling again.

diffstat:

 qeth_main.c |   24 ++++++-----
 qeth_proc.c |  126 ++++++++++++++++++++++++++++++++----------------------------
 2 files changed, 82 insertions(+), 68 deletions(-)
drivers/s390/net/qeth_main.c +13 -11
diff -Naupr linux-2.6-orig/drivers/s390/net/qeth_main.c linux-2.6-patched/drivers/s390/net/qeth_main.c
@@ -8120,20 +8120,22 @@ static struct notifier_block qeth_ip6_no
 #endif
 
 static int
-qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+__qeth_reboot_event_card(struct device *dev, void *data)
 {
-
-	struct device *entry;
 	struct qeth_card *card;
 
-	down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-	       list_for_each_entry(entry, &qeth_ccwgroup_driver.driver.devices,
-			           driver_list) {
-	               card = (struct qeth_card *) entry->driver_data;
-		       qeth_clear_ip_list(card, 0, 0);
-		       qeth_qdio_clear_card(card, 0);
-	       }
-	up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
+	card = (struct qeth_card *) dev->driver_data;
+	qeth_clear_ip_list(card, 0, 0);
+	qeth_qdio_clear_card(card, 0);
+	return 0;
+}
+
+static int
+qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
+{
+
+	driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+			       __qeth_reboot_event_card);
 	return NOTIFY_DONE;
 }
 
drivers/s390/net/qeth_proc.c +69 -57

204 lines not on this page · raw message