Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124167
b: refs/heads/master
c: 04e0ffb
h: refs/heads/master
i:
  124165: f6f8114
  124163: 6c8941e
  124159: f3ab620
v: v3
  • Loading branch information
Alexey Klimov authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 1a19577 commit 0194c8e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f34253dfe66ff365a794eeddbe240b4bfd8e32eb
refs/heads/master: 04e0ffbbdd297fac1d8a5696b5d27887d6ff3dc2
45 changes: 41 additions & 4 deletions trunk/drivers/media/radio/dsbr100.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
static void usb_dsbr100_disconnect(struct usb_interface *intf);
static int usb_dsbr100_open(struct inode *inode, struct file *file);
static int usb_dsbr100_close(struct inode *inode, struct file *file);
static int usb_dsbr100_suspend(struct usb_interface *intf,
pm_message_t message);
static int usb_dsbr100_resume(struct usb_interface *intf);

static int radio_nr = -1;
module_param(radio_nr, int, 0);
Expand All @@ -157,10 +160,14 @@ MODULE_DEVICE_TABLE (usb, usb_dsbr100_device_table);

/* USB subsystem interface */
static struct usb_driver usb_dsbr100_driver = {
.name = "dsbr100",
.probe = usb_dsbr100_probe,
.disconnect = usb_dsbr100_disconnect,
.id_table = usb_dsbr100_device_table,
.name = "dsbr100",
.probe = usb_dsbr100_probe,
.disconnect = usb_dsbr100_disconnect,
.id_table = usb_dsbr100_device_table,
.suspend = usb_dsbr100_suspend,
.resume = usb_dsbr100_resume,
.reset_resume = usb_dsbr100_resume,
.supports_autosuspend = 0,
};

/* Low-level device interface begins here */
Expand Down Expand Up @@ -448,6 +455,36 @@ static int usb_dsbr100_close(struct inode *inode, struct file *file)
return 0;
}

/* Suspend device - stop device. */
static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
{
struct dsbr100_device *radio = usb_get_intfdata(intf);
int retval;

retval = dsbr100_stop(radio);
if (retval == -1)
dev_warn(&intf->dev, "dsbr100_stop failed\n");

dev_info(&intf->dev, "going into suspend..\n");

return 0;
}

/* Resume device - start device. */
static int usb_dsbr100_resume(struct usb_interface *intf)
{
struct dsbr100_device *radio = usb_get_intfdata(intf);
int retval;

retval = dsbr100_start(radio);
if (retval == -1)
dev_warn(&intf->dev, "dsbr100_start failed\n");

dev_info(&intf->dev, "coming out of suspend..\n");

return 0;
}

/* File system interface */
static const struct file_operations usb_dsbr100_fops = {
.owner = THIS_MODULE,
Expand Down

0 comments on commit 0194c8e

Please sign in to comment.