On Mon, 13 Jul 2009 23:24:10 +0200 Oliver Neukum wrote: > This is needed for compilation without CONFIG_PM. > > Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx> > > Hi, > > this patch should go into 2.6.31 > > Regards > Oliver > > -- > > commit e1f9ea5317ab78f890a50c7383aee50fb9b8c36c > Author: Oliver Neukum <oliver@xxxxxxxxxx> > Date: Mon Jul 13 23:19:02 2009 +0200 > > usb:let the option driver compile without CONFIG_PM > > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c > index 50f38d7..ad8bd1e 100644 > --- a/drivers/usb/serial/option.c > +++ b/drivers/usb/serial/option.c > @@ -66,8 +66,10 @@ static int option_tiocmget(struct tty_struct *tty, struct file *file); > static int option_tiocmset(struct tty_struct *tty, struct file *file, > unsigned int set, unsigned int clear); > static int option_send_setup(struct usb_serial_port *port); > +#ifdef CONFIG_PM > static int option_suspend(struct usb_serial *serial, pm_message_t message); > static int option_resume(struct usb_serial *serial); > +#endif > > /* Vendor and product IDs */ > #define OPTION_VENDOR_ID 0x0AF0 > @@ -539,11 +541,15 @@ static struct usb_driver option_driver = { > .name = "option", > .probe = usb_serial_probe, > .disconnect = usb_serial_disconnect, > +#ifdef CONFIG_PM > .suspend = usb_serial_suspend, > .resume = usb_serial_resume, > +#endif > .id_table = option_ids, > .no_dynamic_id = 1, > +#ifdef CONFIG_PM > .supports_autosuspend = 1, > +#endif > }; > > /* The card has three separate interfaces, which the serial driver > @@ -573,8 +579,10 @@ static struct usb_serial_driver option_1port_device = { > .disconnect = option_disconnect, > .release = option_release, > .read_int_callback = option_instat_callback, > +#ifdef CONFIG_PM > .suspend = option_suspend, > .resume = option_resume, > +#endif > }; > > static int debug; > @@ -601,7 +609,7 @@ struct option_port_private { > u8 *out_buffer[N_OUT_URB]; > unsigned long out_busy; /* Bit vector of URBs in use */ > int opened; > - struct usb_anchor delayed; > + struct usb_anchor delayed; Thanks, this now builds in linux-next, although I had to drop the patch segment above (it didn't apply cleanly, no big deal). > /* Settings for the port */ > int rts_state; /* Handshaking pins (outputs) */ > @@ -1252,6 +1260,7 @@ static void option_release(struct usb_serial *serial) > } > } > > +#ifdef CONFIG_PM > static int option_suspend(struct usb_serial *serial, pm_message_t message) > { > struct option_intf_private *intfdata = serial->private; > @@ -1350,6 +1359,7 @@ static int option_resume(struct usb_serial *serial) > err_out: > return err; > } > +#endif > > MODULE_AUTHOR(DRIVER_AUTHOR); > MODULE_DESCRIPTION(DRIVER_DESC); > --- ~Randy LPC 2009, Sept. 23-25, Portland, Oregon http://linuxplumbersconf.org/2009/ -- 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