From 6428737c1f3b2b5f3c18f67127c85535f6ca055a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 17 Feb 2003 23:52:11 -0800 Subject: [PATCH] USB: add "present" flag to usb_device structure. This solves lots of races when drivers hold a reference to the usb_device after the device is physically removed from the system (like when a user has a open handle.) This now prevents any new urbs being submitted or canceled for the device. --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb.h b/include/linux/usb.h index b0873cc6d8e1..bec58dddacef 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -239,6 +239,7 @@ struct usb_device { int have_langid; /* whether string_langid is valid yet */ int string_langid; /* language ID for strings */ + int present; /* if device is present or not */ void *hcpriv; /* Host Controller private data */ -- cgit v1.2.3