diff options
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 10 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 5 |
5 files changed, 14 insertions, 19 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index e4c6e87f6c5d..c91cf8958b38 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1668,9 +1668,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ra | |||
1668 | return 0; | 1668 | return 0; |
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 1671 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) |
1672 | { | 1672 | { |
1673 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; | ||
1674 | int ret; | 1673 | int ret; |
1675 | u8 data[4]; | 1674 | u8 data[4]; |
1676 | u32 div; | 1675 | u32 div; |
@@ -1687,7 +1686,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param | |||
1687 | 1686 | ||
1688 | if (params->frequency > 1530000) data[3] = 0xc0; | 1687 | if (params->frequency > 1530000) data[3] = 0xc0; |
1689 | 1688 | ||
1690 | ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); | 1689 | ret = i2c_transfer(i2c, &msg, 1); |
1691 | if (ret != 1) | 1690 | if (ret != 1) |
1692 | return -EIO; | 1691 | return -EIO; |
1693 | return 0; | 1692 | return 0; |
@@ -1751,9 +1750,8 @@ static u8 alps_bsbe1_inittab[] = { | |||
1751 | 0xff, 0xff | 1750 | 0xff, 0xff |
1752 | }; | 1751 | }; |
1753 | 1752 | ||
1754 | static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 1753 | static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) |
1755 | { | 1754 | { |
1756 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; | ||
1757 | int ret; | 1755 | int ret; |
1758 | u8 data[4]; | 1756 | u8 data[4]; |
1759 | u32 div; | 1757 | u32 div; |
@@ -1768,7 +1766,7 @@ static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param | |||
1768 | data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; | 1766 | data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; |
1769 | data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; | 1767 | data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; |
1770 | 1768 | ||
1771 | ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); | 1769 | ret = i2c_transfer(i2c, &msg, 1); |
1772 | return (ret != 1) ? -EIO : 0; | 1770 | return (ret != 1) ? -EIO : 0; |
1773 | } | 1771 | } |
1774 | 1772 | ||
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 9746d2bb916f..311be50b2fce 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -453,9 +453,9 @@ static int philips_su1278_ty_ci_set_symbol_rate(struct dvb_frontend *fe, u32 sra | |||
453 | } | 453 | } |
454 | 454 | ||
455 | static int philips_su1278_ty_ci_pll_set(struct dvb_frontend *fe, | 455 | static int philips_su1278_ty_ci_pll_set(struct dvb_frontend *fe, |
456 | struct i2c_adapter *i2c, | ||
456 | struct dvb_frontend_parameters *params) | 457 | struct dvb_frontend_parameters *params) |
457 | { | 458 | { |
458 | struct budget_av *budget_av = (struct budget_av *) fe->dvb->priv; | ||
459 | u32 div; | 459 | u32 div; |
460 | u8 buf[4]; | 460 | u8 buf[4]; |
461 | struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; | 461 | struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; |
@@ -481,7 +481,7 @@ static int philips_su1278_ty_ci_pll_set(struct dvb_frontend *fe, | |||
481 | else if (params->frequency < 2150000) | 481 | else if (params->frequency < 2150000) |
482 | buf[3] |= 0xC0; | 482 | buf[3] |= 0xC0; |
483 | 483 | ||
484 | if (i2c_transfer(&budget_av->budget.i2c_adap, &msg, 1) != 1) | 484 | if (i2c_transfer(i2c, &msg, 1) != 1) |
485 | return -EIO; | 485 | return -EIO; |
486 | return 0; | 486 | return 0; |
487 | } | 487 | } |
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index a1267054bc01..88f27a532163 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -548,9 +548,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ra | |||
548 | return 0; | 548 | return 0; |
549 | } | 549 | } |
550 | 550 | ||
551 | static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) | 551 | static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params) |
552 | { | 552 | { |
553 | struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; | ||
554 | u8 buf[4]; | 553 | u8 buf[4]; |
555 | u32 div; | 554 | u32 div; |
556 | struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; | 555 | struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; |
@@ -567,7 +566,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct dvb_frontend_param | |||
567 | if (params->frequency > 1530000) | 566 | if (params->frequency > 1530000) |
568 | buf[3] = 0xc0; | 567 | buf[3] = 0xc0; |
569 | 568 | ||
570 | if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) | 569 | if (i2c_transfer(i2c, &msg, 1) != 1) |
571 | return -EIO; | 570 | return -EIO; |
572 | return 0; | 571 | return 0; |
573 | } | 572 | } |
@@ -669,9 +668,9 @@ static int philips_su1278_tt_set_symbol_rate(struct dvb_frontend *fe, u32 srate, | |||
669 | } | 668 | } |
670 | 669 | ||
671 | static int philips_su1278_tt_pll_set(struct dvb_frontend *fe, | 670 | static int philips_su1278_tt_pll_set(struct dvb_frontend *fe, |
671 | struct i2c_adapter *i2c, | ||
672 | struct dvb_frontend_parameters *params) | 672 | struct dvb_frontend_parameters *params) |
673 | { | 673 | { |
674 | struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; | ||
675 | u32 div; | 674 | u32 div; |
676 | u8 buf[4]; | 675 | u8 buf[4]; |
677 | struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) }; | 676 | struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) }; |
@@ -697,7 +696,7 @@ static int philips_su1278_tt_pll_set(struct dvb_frontend *fe, | |||
697 | else if (params->frequency < 2150000) | 696 | else if (params->frequency < 2150000) |
698 | buf[3] |= 0xC0; | 697 | buf[3] |= 0xC0; |
699 | 698 | ||
700 | if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) | 699 | if (i2c_transfer(i2c, &msg, 1) != 1) |
701 | return -EIO; | 700 | return -EIO; |
702 | return 0; | 701 | return 0; |
703 | } | 702 | } |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 8142e26b47f5..b1f21ef0e3b3 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -353,9 +353,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ra | |||
353 | return 0; | 353 | return 0; |
354 | } | 354 | } |
355 | 355 | ||
356 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 356 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) |
357 | { | 357 | { |
358 | struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; | ||
359 | u8 data[4]; | 358 | u8 data[4]; |
360 | u32 div; | 359 | u32 div; |
361 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; | 360 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; |
@@ -370,7 +369,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param | |||
370 | 369 | ||
371 | if (params->frequency > 1530000) data[3] = 0xc0; | 370 | if (params->frequency > 1530000) data[3] = 0xc0; |
372 | 371 | ||
373 | if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; | 372 | if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; |
374 | return 0; | 373 | return 0; |
375 | } | 374 | } |
376 | 375 | ||
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 9961917e8a7f..5552ef501996 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -332,9 +332,8 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ra | |||
332 | return 0; | 332 | return 0; |
333 | } | 333 | } |
334 | 334 | ||
335 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 335 | static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) |
336 | { | 336 | { |
337 | struct budget* budget = (struct budget*) fe->dvb->priv; | ||
338 | u8 data[4]; | 337 | u8 data[4]; |
339 | u32 div; | 338 | u32 div; |
340 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; | 339 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; |
@@ -349,7 +348,7 @@ static int alps_bsru6_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param | |||
349 | 348 | ||
350 | if (params->frequency > 1530000) data[3] = 0xc0; | 349 | if (params->frequency > 1530000) data[3] = 0xc0; |
351 | 350 | ||
352 | if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; | 351 | if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; |
353 | return 0; | 352 | return 0; |
354 | } | 353 | } |
355 | 354 | ||