On Fri, 2009-07-10 at 06:57 -0700, Alan Stern wrote: > On Thu, 9 Jul 2009, Elina Pasheva wrote: > > > Subject: [PATCH 002/002] USB: serial: sierra driver autosuspend support > > From: Elina Pasheva <epasheva@xxxxxxxxxxxxxxxxxx> > > > +/* sysfs attributes */ > > +static int sierra_create_sysfs_attrs(struct usb_serial_port *port); > > +/* Note: attribute created for each port; removed on disconnect */ > > > +static int sierra_create_sysfs_attrs(struct usb_serial_port *port) > > +{ > > + return device_create_file(&port->dev, &dev_attr_suspend_status); > > +} > > > @@ -866,7 +980,10 @@ static struct usb_serial_driver sierra_d > > .tiocmset = sierra_tiocmset, > > .attach = sierra_startup, > > .disconnect = sierra_disconnect, > > + .port_probe = sierra_create_sysfs_attrs, > > .read_int_callback = sierra_instat_callback, > > + .suspend = sierra_suspend, > > + .resume = sierra_resume, > > }; > > It seems very strange to have code for creating sysfs attributes and > not have code for removing them. > > The comment says they are removed upon disconnect. But that's not > right, because they are created during port_probe, not during attach. > Hence they should be removed during port_remove. > > Alan Stern > > Thanks for your feedback, Alan. Good point. I will fix it accordingly and re-submit [PATCH 002/002] shortly. Regards, Elina -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html