From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@davemloft.net>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6 IrDA] Stir driver suspend fix
Date: Tue, 19 Oct 2004 18:08:19 -0700 [thread overview]
Message-ID: <20041020010819.GK12932@bougret.hpl.hp.com> (raw)
irXXX_stir_suspend.diff :
~~~~~~~~~~~~~~~~~~~~~~~
<Patch 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 <shemminger@osdl.org>
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
diff -Nru a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
--- a/drivers/net/irda/stir4200.c 2004-10-08 14:01:57 -07:00
+++ b/drivers/net/irda/stir4200.c 2004-10-08 14:01:57 -07:00
@@ -761,8 +761,9 @@
&& 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
@@ -775,6 +776,7 @@
if (change_speed(stir, stir->speed))
break;
}
+#endif
/* if something to send? */
skb = xchg(&stir->tx_pending, NULL);
@@ -1125,7 +1127,7 @@
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)
{
@@ -1145,6 +1147,7 @@
/* receiver restarted when send thread wakes up */
return 0;
}
+#endif
/*
* USB device callbacks
@@ -1155,8 +1158,10 @@
.probe = stir_probe,
.disconnect = stir_disconnect,
.id_table = dongles,
+#ifdef CONFIG_PM
.suspend = stir_suspend,
.resume = stir_resume,
+#endif
};
/*
reply other threads:[~2004-10-20 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041020010819.GK12932@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@davemloft.net \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®