* Deepak Saxena <[EMAIL PROTECTED]> [040210 15:04]:
I don't understand why we need this if statement. I see the same in ohci-sa1111.c. I haven't completely groked the whole USB layer, but how whould hcd->dev ever be NULL? I thought each hcd/usb_bus must have a device associated with it.
Don't ask me, I just copied it from sa1111 :) Works fine without it though. But I guess I just don't know how to reproduce the hcd->dev == NULL...
I think the original notion was to make sure the "null pci device" convention would work: hcd->pdev NULL, known by some platforms' dma logic, but certain coding conventions (hcd->pdev->field) would oops so they would live behind null checks. It was in the first version of ohci-hcd to merge, pretty early in 2.5.
But Chris Hoover's sa1111 patches went the "fake pci device" route, so it hasn't ever really been null. And today, people should be going the "real struct device" route.
So at this point it seems like cargo-cult coding to me ... worth getting rid of. ;)
- Dave
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
