mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
media: pci/tbsecp3: Replace strlcpy() with strscpy()
This commit is contained in:
@@ -1467,7 +1467,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
m88rs6060_config.write_eeprom = ecp3_eeprom_write;
|
||||
m88rs6060_config.RF_switch = RF_switch;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
info.addr = m88rs6060_config.demod_adr;
|
||||
info.platform_data = &m88rs6060_config;
|
||||
request_module(info.type);
|
||||
@@ -1506,7 +1506,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
m88rs6060_config.read_eeprom = ecp3_eeprom_read;
|
||||
m88rs6060_config.write_eeprom = ecp3_eeprom_write;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
info.addr = m88rs6060_config.demod_adr;
|
||||
info.platform_data = &m88rs6060_config;
|
||||
request_module(info.type);
|
||||
@@ -1555,7 +1555,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
m88rs6060_config.read_eeprom = ecp3_eeprom_read;
|
||||
m88rs6060_config.write_eeprom = ecp3_eeprom_write;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
info.addr = m88rs6060_config.demod_adr;
|
||||
info.platform_data = &m88rs6060_config;
|
||||
request_module(info.type);
|
||||
@@ -1663,7 +1663,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
m88rs6060_config.read_eeprom = ecp3_eeprom_read;
|
||||
m88rs6060_config.write_eeprom = ecp3_eeprom_write;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
|
||||
info.addr = m88rs6060_config.demod_adr;
|
||||
info.platform_data = &m88rs6060_config;
|
||||
request_module(info.type);
|
||||
@@ -1699,7 +1699,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2183_config.write_properties = ecp3_spi_write;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr %2) ? 0x67 : 0x64;
|
||||
si2183_config.agc_mode = (adapter->nr %2)? 0x5 : 0x4;
|
||||
info.platform_data = &si2183_config;
|
||||
@@ -1733,7 +1733,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr %2) ? 0x60 : 0x61;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -1779,7 +1779,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2183_config.read_properties = ecp3_spi_read;
|
||||
si2183_config.write_properties = ecp3_spi_write;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
|
||||
info.addr = (adapter->nr %2)? 0x64 : 0x67;
|
||||
si2183_config.agc_mode = (adapter->nr%2)? 0x4 : 0x5;
|
||||
@@ -1920,7 +1920,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
gx1503_config.i2c_wr_max = 8;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "gx1503", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "gx1503", I2C_NAME_SIZE);
|
||||
info.addr = 0x30;
|
||||
info.platform_data = &gx1503_config;
|
||||
request_module(info.type);
|
||||
@@ -1941,7 +1941,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 0;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -1964,7 +1964,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
mtv23x_config.i2c_wr_max = 32;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "mtv23x", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "mtv23x", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr%2)? 0x44 : 0x43;
|
||||
info.platform_data = &mtv23x_config;
|
||||
request_module(info.type);
|
||||
@@ -1991,7 +1991,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2183_config.write_properties = ecp3_spi_write;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr%2)? 0x67 : 0x64;
|
||||
si2183_config.agc_mode = (adapter->nr%2)? 0x5 : 0x4;
|
||||
info.platform_data = &si2183_config;
|
||||
@@ -2019,7 +2019,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr %2)? 0x60 : 0x63;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -2051,7 +2051,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2168_config.ts_clock_gapped = true;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
@@ -2070,7 +2070,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -2095,7 +2095,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2168_config.ts_clock_inv=0;//zc2016/07/20
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
info.addr = 0x64;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
@@ -2114,7 +2114,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -2144,7 +2144,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2183_config.write_properties = ecp3_spi_write;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr %2) ? 0x64 : 0x67;
|
||||
si2183_config.agc_mode = (adapter->nr %2)? 0x4 : 0x5;
|
||||
info.platform_data = &si2183_config;
|
||||
@@ -2178,7 +2178,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
info.addr = (adapter->nr %2) ? 0x61 : 0x60;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
@@ -2227,7 +2227,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2183_config.write_properties = ecp3_spi_write;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2183", I2C_NAME_SIZE);
|
||||
if(pci->subsystem_vendor==0x6528)
|
||||
{
|
||||
info.addr = 0x67;
|
||||
@@ -2268,7 +2268,7 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
si2157_config.if_port = 1;
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
strscpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
if(pci->subsystem_vendor==0x6528)info.addr = 0x61;
|
||||
else
|
||||
info.addr = adapter->nr ? 0x61 : 0x60;
|
||||
@@ -2503,9 +2503,9 @@ static int tbsecp3_frontend_attach(struct tbsecp3_adapter *adapter)
|
||||
return -ENODEV;
|
||||
break;
|
||||
}
|
||||
strlcpy(adapter->fe->ops.info.name,dev->info->name,52);
|
||||
strscpy(adapter->fe->ops.info.name,dev->info->name,52);
|
||||
if (adapter->fe2)
|
||||
strlcpy(adapter->fe2->ops.info.name,dev->info->name,52);
|
||||
strscpy(adapter->fe2->ops.info.name,dev->info->name,52);
|
||||
return 0;
|
||||
|
||||
frontend_atach_fail:
|
||||
|
Reference in New Issue
Block a user