From: Jean Tourrilhes From: Stephen Hemminger o [FEATURE] stir4200: don't need suspend/resume if !CONFIG_PM The suspend/resume code only needs to be compiled in if power management is enabled. Signed-off-by: Stephen Hemminger Signed-off-by: Jean Tourrilhes Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/irda/stir4200.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff -puN drivers/net/irda/stir4200.c~irda-stir-driver-suspend-fix drivers/net/irda/stir4200.c --- 25/drivers/net/irda/stir4200.c~irda-stir-driver-suspend-fix Wed Oct 20 15:53:57 2004 +++ 25-akpm/drivers/net/irda/stir4200.c Wed Oct 20 15:53:57 2004 @@ -772,8 +772,9 @@ static int stir_transmit_thread(void *ar && netif_device_present(dev) && !signal_pending(current)) { +#ifdef CONFIG_PM /* if suspending, then power off and wait */ - if (current->flags & PF_FREEZE) { + if (unlikely(current->flags & PF_FREEZE)) { if (stir->receiving) receive_stop(stir); else @@ -786,6 +787,7 @@ static int stir_transmit_thread(void *ar if (change_speed(stir, stir->speed)) break; } +#endif /* if something to send? */ skb = xchg(&stir->tx_pending, NULL); @@ -1137,7 +1139,7 @@ static void stir_disconnect(struct usb_i usb_set_intfdata(intf, NULL); } - +#ifdef CONFIG_PM /* Power management suspend, so power off the transmitter/receiver */ static int stir_suspend(struct usb_interface *intf, u32 state) { @@ -1157,6 +1159,7 @@ static int stir_resume(struct usb_interf /* receiver restarted when send thread wakes up */ return 0; } +#endif /* * USB device callbacks @@ -1167,8 +1170,10 @@ static struct usb_driver irda_driver = { .probe = stir_probe, .disconnect = stir_disconnect, .id_table = dongles, +#ifdef CONFIG_PM .suspend = stir_suspend, .resume = stir_resume, +#endif }; /* _