Skip to contentSkip to conversation

ieee1394.c on - compilation errors

PATCH In review Grzegorz Jaskiewicz 2 participants 3 messages Apr 30, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ieee1394.c on - compilation errors

Hello there!

Another trivial, monkeys job patch.

Anyway, it is good to look at some changes and learn :)

1) dev->class_num does not exists anymore

Signature · 2 lines
Grzegorz Jaskiewicz <[email protected]>
K4 labs
drivers/ieee1394/nodemgr.c +0 -21
diff -u -r org/drivers/ieee1394/nodemgr.c popsuty/drivers/ieee1394/nodemgr.c
@@ -364,9 +364,6 @@
         struct unit_directory *ud;
 	struct ieee1394_device_id *id;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return 0;
-
 	ud = container_of(dev, struct unit_directory, device);
 	driver = container_of(drv, struct hpsb_protocol_driver, driver);
 
@@ -494,18 +491,15 @@
 static struct device nodemgr_dev_template_ud = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ud,
-	.class_num	= DEV_CLASS_UNIT_DIRECTORY,
 };
 
 static struct device nodemgr_dev_template_ne = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ne,
-	.class_num	= DEV_CLASS_NODE,
 };
 
 static struct device nodemgr_dev_template_host = {
 	.bus		= &ieee1394_bus_type,
-	.class_num	= DEV_CLASS_HOST,
 };
 
 
@@ -727,9 +721,6 @@
         struct guid_search_baton *search = __data;
         struct node_entry *ne;
 
-        if (dev->class_num != DEV_CLASS_NODE)
-                return 0;
-
         ne = container_of(dev, struct node_entry, device);
 
         if (ne->guid == search->guid) {
@@ -764,9 +755,6 @@
 	struct nodeid_search_baton *search = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
-		return 0;
-
 	ne = container_of(dev, struct node_entry, device);
 
 	if (ne->host == search->host && ne->nodeid == search->nodeid) {
@@ -1131,9 +1119,6 @@
 	if (!dev)
 		return -ENODEV;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return -ENODEV;
-
 	ud = container_of(dev, struct unit_directory, device);
 
 	scratch = buffer;
@@ -1258,9 +1243,6 @@
 	struct node_entry *ne = __data;
 	struct unit_directory *ud;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return 0;
-
 	ud = container_of(dev, struct unit_directory, device);
 
 	if (&ne->device != ud->device.parent)
@@ -1446,9 +1428,6 @@
 	struct cleanup_baton *cleanup = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
-		return 0;
-
 	ne = container_of(dev, struct node_entry, device);
 
 	if (ne->host != cleanup->host)
#1 lore raw
Quoted 6 lines · Grzegorz Jaskiewicz

Hello there!

Another trivial, monkeys job patch.

Anyway, it is good to look at some changes and learn :)

Please inspect the logic before removing things :)

I already submitted a patch to Linus to fix this. The problem is that class_num was used as an opaque way of determining what sort of device (host/node/unitdir) it was dealing with on the ieee1394 bus. Your patch would likely cause a lot of oopses.

Signature · 4 lines
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/
#2 lore raw
Quoted 6 lines · Ben Collins

Please inspect the logic before removing things :)

I already submitted a patch to Linus to fix this. The problem is that class_num was used as an opaque way of determining what sort of device (host/node/unitdir) it was dealing with on the ieee1394 bus. Your patch would likely cause a lot of oopses.

I wasn't sure about that. maybe i should ask for better way. :)

thanks for response.

Signature · 2 lines
Grzegorz Jaskiewicz <[email protected]>
K4 labs