Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164951
b: refs/heads/master
c: b95cd7e
h: refs/heads/master
i:
  164949: bd46280
  164947: 3183148
  164943: 1fce0df
v: v3
  • Loading branch information
Laurent Pinchart authored and Greg Kroah-Hartman committed Sep 23, 2009
1 parent 412c6a0 commit d98ed1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 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: 512ad27d8667158747de2e8da8a23e8f50e91856
refs/heads/master: b95cd7ec3e93bae199e820bd65b21b23e4538acc
15 changes: 15 additions & 0 deletions trunk/drivers/usb/gadget/f_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ static int audio_buf_size = 48000;
module_param(audio_buf_size, int, S_IRUGO);
MODULE_PARM_DESC(audio_buf_size, "Audio buffer size");

static int generic_set_cmd(struct usb_audio_control *con, u8 cmd, int value);
static int generic_get_cmd(struct usb_audio_control *con, u8 cmd);

/*
* DESCRIPTORS ... most are static, but strings and full
* configuration descriptors are built on demand.
Expand Down Expand Up @@ -632,6 +635,18 @@ f_audio_unbind(struct usb_configuration *c, struct usb_function *f)

/*-------------------------------------------------------------------------*/

static int generic_set_cmd(struct usb_audio_control *con, u8 cmd, int value)
{
con->data[cmd] = value;

return 0;
}

static int generic_get_cmd(struct usb_audio_control *con, u8 cmd)
{
return con->data[cmd];
}

/* Todo: add more control selecotor dynamically */
int __init control_selector_init(struct f_audio *audio)
{
Expand Down
12 changes: 0 additions & 12 deletions trunk/include/linux/usb/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,6 @@ struct usb_audio_control {
int (*get)(struct usb_audio_control *con, u8 cmd);
};

static inline int generic_set_cmd(struct usb_audio_control *con, u8 cmd, int value)
{
con->data[cmd] = value;

return 0;
}

static inline int generic_get_cmd(struct usb_audio_control *con, u8 cmd)
{
return con->data[cmd];
}

struct usb_audio_control_selector {
struct list_head list;
struct list_head control;
Expand Down

0 comments on commit d98ed1b

Please sign in to comment.