Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241945
b: refs/heads/master
c: 195288d
h: refs/heads/master
i:
  241943: 90c1816
v: v3
  • Loading branch information
Igor M. Liplianin authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent 2af4445 commit f9af249
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 15 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: feb16e9833ad06ac00f23c1abf1e7d649192e3f5
refs/heads/master: 195288da53e03c35f97df8fa08f48f5b625bfb4e
72 changes: 58 additions & 14 deletions trunk/drivers/media/dvb/dvb-usb/dw2102.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static int dw3101_frontend_attach(struct dvb_usb_adapter *d)
return -EIO;
}

static int s6x0_frontend_attach(struct dvb_usb_adapter *d)
static int zl100313_frontend_attach(struct dvb_usb_adapter *d)
{
d->fe = dvb_attach(mt312_attach, &zl313_config,
&d->dev->i2c_adap);
Expand All @@ -899,6 +899,11 @@ static int s6x0_frontend_attach(struct dvb_usb_adapter *d)
}
}

return -EIO;
}

static int stv0288_frontend_attach(struct dvb_usb_adapter *d)
{
d->fe = dvb_attach(stv0288_attach, &earda_config,
&d->dev->i2c_adap);
if (d->fe != NULL) {
Expand All @@ -910,6 +915,11 @@ static int s6x0_frontend_attach(struct dvb_usb_adapter *d)
}
}

return -EIO;
}

static int ds3000_frontend_attach(struct dvb_usb_adapter *d)
{
d->fe = dvb_attach(ds3000_attach, &dw2104_ds3000_config,
&d->dev->i2c_adap);
if (d->fe != NULL) {
Expand Down Expand Up @@ -1418,7 +1428,7 @@ static struct dvb_usb_device_properties s6x0_properties = {
.read_mac_address = s6x0_read_mac_address,
.adapter = {
{
.frontend_attach = s6x0_frontend_attach,
.frontend_attach = zl100313_frontend_attach,
.streaming_ctrl = NULL,
.tuner_attach = NULL,
.stream = {
Expand All @@ -1433,23 +1443,29 @@ static struct dvb_usb_device_properties s6x0_properties = {
},
}
},
.num_device_descs = 3,
.num_device_descs = 1,
.devices = {
{"TeVii S630 USB",
{&dw2102_table[6], NULL},
{NULL},
},
{"Prof 1100 USB ",
{&dw2102_table[7], NULL},
{NULL},
},
{"TeVii S660 USB",
{&dw2102_table[8], NULL},
{NULL},
},
}
};

struct dvb_usb_device_properties *p1100;
static struct dvb_usb_device_description d1100 = {
"Prof 1100 USB ",
{&dw2102_table[7], NULL},
{NULL},
};

struct dvb_usb_device_properties *s660;
static struct dvb_usb_device_description d660 = {
"TeVii S660 USB",
{&dw2102_table[8], NULL},
{NULL},
};

struct dvb_usb_device_properties *p7500;
static struct dvb_usb_device_description d7500 = {
"Prof 7500 USB DVB-S2",
Expand All @@ -1460,14 +1476,38 @@ static struct dvb_usb_device_description d7500 = {
static int dw2102_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
p1100 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL);
if (!p1100)
return -ENOMEM;
/* copy default structure */
memcpy(p1100, &s6x0_properties,
sizeof(struct dvb_usb_device_properties));
/* fill only different fields */
p1100->firmware = "dvb-usb-p1100.fw";
p1100->devices[0] = d1100;
p1100->rc.legacy.rc_map_table = rc_map_tbs_table;
p1100->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table);
p1100->adapter->frontend_attach = stv0288_frontend_attach;

s660 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL);
if (!s660) {
kfree(p1100);
return -ENOMEM;
}
memcpy(s660, &s6x0_properties,
sizeof(struct dvb_usb_device_properties));
s660->firmware = "dvb-usb-s660.fw";
s660->devices[0] = d660;
s660->adapter->frontend_attach = ds3000_frontend_attach;

p7500 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL);
if (!p7500)
if (!p7500) {
kfree(p1100);
kfree(s660);
return -ENOMEM;
/* copy default structure */
}
memcpy(p7500, &s6x0_properties,
sizeof(struct dvb_usb_device_properties));
/* fill only different fields */
p7500->firmware = "dvb-usb-p7500.fw";
p7500->devices[0] = d7500;
p7500->rc.legacy.rc_map_table = rc_map_tbs_table;
Expand All @@ -1482,6 +1522,10 @@ static int dw2102_probe(struct usb_interface *intf,
THIS_MODULE, NULL, adapter_nr) ||
0 == dvb_usb_device_init(intf, &s6x0_properties,
THIS_MODULE, NULL, adapter_nr) ||
0 == dvb_usb_device_init(intf, p1100,
THIS_MODULE, NULL, adapter_nr) ||
0 == dvb_usb_device_init(intf, s660,
THIS_MODULE, NULL, adapter_nr) ||
0 == dvb_usb_device_init(intf, p7500,
THIS_MODULE, NULL, adapter_nr))
return 0;
Expand Down

0 comments on commit f9af249

Please sign in to comment.