diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-i2c.c')
| -rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 771adf47e944..32129f3ea836 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
| @@ -136,7 +136,7 @@ static const u8 hw_addrs[] = { | |||
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /* This array should match the IVTV_HW_ defines */ | 138 | /* This array should match the IVTV_HW_ defines */ |
| 139 | static const char * const hw_drivernames[] = { | 139 | static const char * const hw_devicenames[] = { |
| 140 | "cx25840", | 140 | "cx25840", |
| 141 | "saa7115", | 141 | "saa7115", |
| 142 | "saa7127", | 142 | "saa7127", |
| @@ -145,7 +145,7 @@ static const char * const hw_drivernames[] = { | |||
| 145 | "wm8775", | 145 | "wm8775", |
| 146 | "cs53l32a", | 146 | "cs53l32a", |
| 147 | "tveeprom", | 147 | "tveeprom", |
| 148 | "saa7115", | 148 | "saa7114", |
| 149 | "upd64031a", | 149 | "upd64031a", |
| 150 | "upd64083", | 150 | "upd64083", |
| 151 | "saa717x", | 151 | "saa717x", |
| @@ -167,8 +167,7 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) | |||
| 167 | return -1; | 167 | return -1; |
| 168 | id = hw_driverids[idx]; | 168 | id = hw_driverids[idx]; |
| 169 | memset(&info, 0, sizeof(info)); | 169 | memset(&info, 0, sizeof(info)); |
| 170 | strlcpy(info.driver_name, hw_drivernames[idx], | 170 | strlcpy(info.type, hw_devicenames[idx], sizeof(info.type)); |
| 171 | sizeof(info.driver_name)); | ||
| 172 | info.addr = hw_addrs[idx]; | 171 | info.addr = hw_addrs[idx]; |
| 173 | for (i = 0; itv->i2c_clients[i] && i < I2C_CLIENTS_MAX; i++) {} | 172 | for (i = 0; itv->i2c_clients[i] && i < I2C_CLIENTS_MAX; i++) {} |
| 174 | 173 | ||
| @@ -657,7 +656,7 @@ static const char *ivtv_i2c_id_name(u32 id) | |||
| 657 | 656 | ||
| 658 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) | 657 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) |
| 659 | if (hw_driverids[i] == id) | 658 | if (hw_driverids[i] == id) |
| 660 | return hw_drivernames[i]; | 659 | return hw_devicenames[i]; |
| 661 | return "unknown device"; | 660 | return "unknown device"; |
| 662 | } | 661 | } |
| 663 | 662 | ||
| @@ -668,7 +667,7 @@ static const char *ivtv_i2c_hw_name(u32 hw) | |||
| 668 | 667 | ||
| 669 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) | 668 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) |
| 670 | if (1 << i == hw) | 669 | if (1 << i == hw) |
| 671 | return hw_drivernames[i]; | 670 | return hw_devicenames[i]; |
| 672 | return "unknown device"; | 671 | return "unknown device"; |
| 673 | } | 672 | } |
| 674 | 673 | ||
| @@ -770,7 +769,7 @@ int init_ivtv_i2c(struct ivtv *itv) | |||
| 770 | * same size and GPIO must be the last entry. | 769 | * same size and GPIO must be the last entry. |
| 771 | */ | 770 | */ |
| 772 | if (ARRAY_SIZE(hw_driverids) != ARRAY_SIZE(hw_addrs) || | 771 | if (ARRAY_SIZE(hw_driverids) != ARRAY_SIZE(hw_addrs) || |
| 773 | ARRAY_SIZE(hw_drivernames) != ARRAY_SIZE(hw_addrs) || | 772 | ARRAY_SIZE(hw_devicenames) != ARRAY_SIZE(hw_addrs) || |
| 774 | IVTV_HW_GPIO != (1 << (ARRAY_SIZE(hw_addrs) - 1)) || | 773 | IVTV_HW_GPIO != (1 << (ARRAY_SIZE(hw_addrs) - 1)) || |
| 775 | hw_driverids[ARRAY_SIZE(hw_addrs) - 1]) { | 774 | hw_driverids[ARRAY_SIZE(hw_addrs) - 1]) { |
| 776 | IVTV_ERR("Mismatched I2C hardware arrays\n"); | 775 | IVTV_ERR("Mismatched I2C hardware arrays\n"); |
