From 31243088bd32d5568f06f2044f8ff782641e16b5 Mon Sep 17 00:00:00 2001
From: David Ellingsworth <david@xxxxxxxxxxxxxxxxx>
Date: Sat, 12 Sep 2009 02:05:57 -0400
Subject: [PATCH 09/10] mr800: preserve radio state during suspend/resume
Signed-off-by: David Ellingsworth <david@xxxxxxxxxxxxxxxxx>
---
drivers/media/radio/radio-mr800.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/media/radio/radio-mr800.c
b/drivers/media/radio/radio-mr800.c
index 11db6ea..10bed62 100644
--- a/drivers/media/radio/radio-mr800.c
+++ b/drivers/media/radio/radio-mr800.c
@@ -574,9 +574,12 @@ static int usb_amradio_suspend(struct usb_interface
*intf, pm_message_t message)
mutex_lock(&radio->lock);
- retval = amradio_set_mute(radio, AMRADIO_STOP);
- if (retval < 0)
- dev_warn(&intf->dev, "amradio_stop failed\n");
+ if (!radio->muted) {
+ retval = amradio_set_mute(radio, AMRADIO_STOP);
+ if (retval < 0)
+ dev_warn(&intf->dev, "amradio_stop failed\n");
+ radio->muted = 0;
+ }
dev_info(&intf->dev, "going into suspend..\n");
@@ -592,9 +595,11 @@ static int usb_amradio_resume(struct usb_interface
*intf)
mutex_lock(&radio->lock);
- retval = amradio_set_mute(radio, AMRADIO_START);
- if (retval < 0)
- dev_warn(&intf->dev, "amradio_start failed\n");
+ if (!radio->muted) {
+ retval = amradio_set_mute(radio, AMRADIO_START);
+ if (retval < 0)
+ dev_warn(&intf->dev, "amradio_start failed\n");
+ }
dev_info(&intf->dev, "coming out of suspend..\n");
--
1.6.3.3
>From 31243088bd32d5568f06f2044f8ff782641e16b5 Mon Sep 17 00:00:00 2001
From: David Ellingsworth <david@xxxxxxxxxxxxxxxxx>
Date: Sat, 12 Sep 2009 02:05:57 -0400
Subject: [PATCH 09/10] mr800: preserve radio state during suspend/resume
Signed-off-by: David Ellingsworth <david@xxxxxxxxxxxxxxxxx>
---
drivers/media/radio/radio-mr800.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
index 11db6ea..10bed62 100644
--- a/drivers/media/radio/radio-mr800.c
+++ b/drivers/media/radio/radio-mr800.c
@@ -574,9 +574,12 @@ static int usb_amradio_suspend(struct usb_interface *intf, pm_message_t message)
mutex_lock(&radio->lock);
- retval = amradio_set_mute(radio, AMRADIO_STOP);
- if (retval < 0)
- dev_warn(&intf->dev, "amradio_stop failed\n");
+ if (!radio->muted) {
+ retval = amradio_set_mute(radio, AMRADIO_STOP);
+ if (retval < 0)
+ dev_warn(&intf->dev, "amradio_stop failed\n");
+ radio->muted = 0;
+ }
dev_info(&intf->dev, "going into suspend..\n");
@@ -592,9 +595,11 @@ static int usb_amradio_resume(struct usb_interface *intf)
mutex_lock(&radio->lock);
- retval = amradio_set_mute(radio, AMRADIO_START);
- if (retval < 0)
- dev_warn(&intf->dev, "amradio_start failed\n");
+ if (!radio->muted) {
+ retval = amradio_set_mute(radio, AMRADIO_START);
+ if (retval < 0)
+ dev_warn(&intf->dev, "amradio_start failed\n");
+ }
dev_info(&intf->dev, "coming out of suspend..\n");
--
1.6.3.3