Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357183
b: refs/heads/master
c: 7543f34
h: refs/heads/master
i:
  357181: fb0483d
  357179: a63b55a
  357175: 833673e
  357167: fe6e7a5
  357151: 8f299f2
  357119: 23e2d64
v: v3
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent e318b8d commit f580142
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 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: 908498349562ff6614d570b40e904a20d397dafa
refs/heads/master: 7543f344e9b06afe86b55a2620f5c11b38bd5642
28 changes: 19 additions & 9 deletions trunk/drivers/media/usb/dvb-usb/m920x.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ static inline int m920x_write(struct usb_device *udev, u8 request,
return ret;
}

static inline int m920x_write_seq(struct usb_device *udev, u8 request,
struct m920x_inits *seq)
{
int ret;
while (seq->address) {
ret = m920x_write(udev, request, seq->data, seq->address);
if (ret != 0)
return ret;

seq++;
}

return ret;
}

static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq)
{
int ret = 0, i, epi, flags = 0;
Expand All @@ -71,15 +86,10 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq)
/* Remote controller init. */
if (d->props.rc.legacy.rc_query) {
deb("Initialising remote control\n");
while (rc_seq->address) {
if ((ret = m920x_write(d->udev, M9206_CORE,
rc_seq->data,
rc_seq->address)) != 0) {
deb("Initialising remote control failed\n");
return ret;
}

rc_seq++;
ret = m920x_write_seq(d->udev, M9206_CORE, rc_seq);
if (ret != 0) {
deb("Initialising remote control failed\n");
return ret;
}

deb("Initialising remote control success\n");
Expand Down

0 comments on commit f580142

Please sign in to comment.