On Sat, 10 Apr 2010, Stéphane Chatty wrote: > > Am Samstag, den 10.04.2010, 16:43 +0200 schrieb Stephane Chatty: > > > Added support for the eGalax dual-touch panel, found on the Asus EeePC > > > T101MT > > > > > +static void egalax_remove(struct hid_device *hdev) > > > +{ > > > + hid_hw_stop(hdev); > > > + kfree(hid_get_drvdata(hdev)); > > > + hid_set_drvdata(hdev, NULL); > > > +} > > > > Why not using hid_hw_stop() instead of hid_set_drvdata()? > > > > Er, actually for a previous driver Dmitry suggested to add this line and > I did it without trying to understand :-) Currently no code should be relying on this, but it's always nice/safe to do such initialization. Using 'if (!hdev)' to check whether hdev is valid/initialized or not should be always legitimate thing to do. -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html