diff options
author | Brad Love <brad@nextdimension.cc> | 2018-05-03 17:20:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-05 08:23:33 -0400 |
commit | af1b4c35a7dc040d0d97deed6cc2a72313ae11c4 (patch) | |
tree | db5bc5a2b606a50829145eb6ce5c3f70c1516875 /drivers/media/usb/cx231xx | |
parent | 830a57f41f74bc8dfd4b4329f3f4996145616219 (diff) | |
download | linux-af1b4c35a7dc040d0d97deed6cc2a72313ae11c4.tar.gz linux-af1b4c35a7dc040d0d97deed6cc2a72313ae11c4.tar.bz2 linux-af1b4c35a7dc040d0d97deed6cc2a72313ae11c4.zip |
media: cx231xx: Use board profile values for addresses
Replace all usage of hard coded values with
the proper field from the board profile.
Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/cx231xx')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 04738fbdfd1a..146b8531655b 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -732,7 +732,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; if (!dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &cnxt_rde253s_tunerconfig)) { result = -EINVAL; goto out_free; @@ -756,7 +756,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; if (!dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &cnxt_rde253s_tunerconfig)) { result = -EINVAL; goto out_free; @@ -783,7 +783,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &hcw_tda18271_config); break; @@ -801,7 +801,7 @@ static int dvb_init(struct cx231xx *dev) memset(&info, 0, sizeof(struct i2c_board_info)); strlcpy(info.type, "si2165", I2C_NAME_SIZE); - info.addr = 0x64; + info.addr = dev->board.demod_addr; info.platform_data = &si2165_pdata; request_module(info.type); client = i2c_new_device(demod_i2c, &info); @@ -826,8 +826,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, - tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &hcw_tda18271_config); dev->cx231xx_reset_analog_tuner = NULL; @@ -848,7 +847,7 @@ static int dvb_init(struct cx231xx *dev) memset(&info, 0, sizeof(struct i2c_board_info)); strlcpy(info.type, "si2165", I2C_NAME_SIZE); - info.addr = 0x64; + info.addr = dev->board.demod_addr; info.platform_data = &si2165_pdata; request_module(info.type); client = i2c_new_device(demod_i2c, &info); @@ -883,7 +882,7 @@ static int dvb_init(struct cx231xx *dev) si2157_config.if_port = 1; si2157_config.inversion = true; strlcpy(info.type, "si2157", I2C_NAME_SIZE); - info.addr = 0x60; + info.addr = dev->board.tuner_addr; info.platform_data = &si2157_config; request_module("si2157"); @@ -942,7 +941,7 @@ static int dvb_init(struct cx231xx *dev) si2157_config.if_port = 1; si2157_config.inversion = true; strlcpy(info.type, "si2157", I2C_NAME_SIZE); - info.addr = 0x60; + info.addr = dev->board.tuner_addr; info.platform_data = &si2157_config; request_module("si2157"); @@ -989,7 +988,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &pv_tda18271_config); break; |