What's the difference between event_bits and change_bits? I just cannot understand why we need two variables.
188 struct usb_hub { ... 205 unsigned long event_bits[1]; /* status change bitmask */ 206 unsigned long change_bits[1]; /* ports with logical connect 207 status change */ Take following section for example,inside hub_events() sampled from drivers/usb/core/hub.c: 2594 /* deal with port status changes */ 2595 for (i = 0; i < hub->descriptor->bNbrPorts; i++) { 2596 connect_change = test_bit(i, hub->change_bits); 2597 if (!test_and_clear_bit(i+1, hub->event_bits) && 2598 !connect_change) 2599 continue; Why do we need to test changes_bits and then test event_bits? Regards Jason ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel