if (dev->driver == &usb_generic_driver) 
if (dev->driver == &usb_generic_driver) { udev = to_usb_device(dev); if (udev->state == USB_STATE_NOTATTACHED) return 0; 
static int usb_generic_resume(struct device *dev){	struct usb_interface	*intf;	struct usb_driver	*driver;	int			status;	if (dev->power.power_state.event == PM_EVENT_ON)		return 0;	/* devices resume through their hubs */	if (dev->driver == &usb_generic_driver)		return usb_resume_device (to_usb_device(dev));	if ((dev->driver == NULL) ||	    (dev->driver_data == &usb_generic_driver_data))		return 0;	intf = to_usb_interface(dev);	driver = to_usb_driver(dev->driver);	/* if driver was suspended, it has a resume method;	 * however, sysfs can wrongly mark things as suspended	 * (on the "no suspend method" FIXME path above)	 */	mark_active(intf);	if (driver->resume) {		status = driver->resume(intf);		if (status) {			dev_err(dev, "%s error %d\n", "resume", status);			mark_quiesced(intf);		}	} else		dev_warn(dev, "no %s?\n", "resume");	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/979d5199fee9e80290ddeb532e5993bd15506712/usb.c/buggy/drivers/usb/core/usb.c