From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH 2/2] ati_remote2: Add autosuspend support Date: Tue, 17 Jun 2008 11:28:11 -0400 Message-ID: <20080617112149.ZZRA012@mailhub.coreip.homeip.net> References: <20080617100959.ZZRA012@mailhub.coreip.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alan Stern Cc: Oliver Neukum , Ville Syrj?l? , linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Peter Stokes List-Id: linux-input@vger.kernel.org On Tue, Jun 17, 2008 at 10:39:15AM -0400, Alan Stern wrote: > On Tue, 17 Jun 2008, Dmitry Torokhov wrote: > > > Input core only protects open() and close(); connect() and > > disconnect() belong to respective bus's implementation the device is > > sitting on and input core has no authority over it. > > What about open vs. unregister? The input core must have some > protection for those two. > input_unregister_device() sets dev->going_away at the very beginning and input_open_device() will fail with -ENODEV when trying to open such devices. dev->going_away (among other things) is protected by dev->mutex. Do you see any issues with this scheme? -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html