diff options
Diffstat (limited to 'drivers/media/video')
24 files changed, 153 insertions, 54 deletions
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 89d8d37838a..3b26fbd3e55 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -901,7 +901,7 @@ endif # V4L_USB_DRIVERS | |||
901 | 901 | ||
902 | config SOC_CAMERA | 902 | config SOC_CAMERA |
903 | tristate "SoC camera support" | 903 | tristate "SoC camera support" |
904 | depends on VIDEO_V4L2 | 904 | depends on VIDEO_V4L2 && HAS_DMA |
905 | select VIDEOBUF_DMA_SG | 905 | select VIDEOBUF_DMA_SG |
906 | help | 906 | help |
907 | SoC Camera is a common API to several cameras, not connecting | 907 | SoC Camera is a common API to several cameras, not connecting |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 2ca3e9cfb2b..0165aac533b 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -2613,7 +2613,7 @@ static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf) | |||
2613 | struct bttv_fh *fh = priv; | 2613 | struct bttv_fh *fh = priv; |
2614 | 2614 | ||
2615 | mutex_lock(&fh->cap.vb_lock); | 2615 | mutex_lock(&fh->cap.vb_lock); |
2616 | retval = videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, | 2616 | retval = __videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, |
2617 | V4L2_MEMORY_MMAP); | 2617 | V4L2_MEMORY_MMAP); |
2618 | if (retval < 0) { | 2618 | if (retval < 0) { |
2619 | mutex_unlock(&fh->cap.vb_lock); | 2619 | mutex_unlock(&fh->cap.vb_lock); |
diff --git a/drivers/media/video/cs5345.c b/drivers/media/video/cs5345.c index 2a429f9e32c..03411503457 100644 --- a/drivers/media/video/cs5345.c +++ b/drivers/media/video/cs5345.c | |||
@@ -160,10 +160,17 @@ static int cs5345_probe(struct i2c_client *client, | |||
160 | 160 | ||
161 | /* ----------------------------------------------------------------------- */ | 161 | /* ----------------------------------------------------------------------- */ |
162 | 162 | ||
163 | static const struct i2c_device_id cs5345_id[] = { | ||
164 | { "cs5345", 0 }, | ||
165 | { } | ||
166 | }; | ||
167 | MODULE_DEVICE_TABLE(i2c, cs5345_id); | ||
168 | |||
163 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 169 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
164 | .name = "cs5345", | 170 | .name = "cs5345", |
165 | .driverid = I2C_DRIVERID_CS5345, | 171 | .driverid = I2C_DRIVERID_CS5345, |
166 | .command = cs5345_command, | 172 | .command = cs5345_command, |
167 | .probe = cs5345_probe, | 173 | .probe = cs5345_probe, |
174 | .id_table = cs5345_id, | ||
168 | }; | 175 | }; |
169 | 176 | ||
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index 2dfd0afc62d..d965af860ab 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
@@ -144,7 +144,8 @@ static int cs53l32a_probe(struct i2c_client *client, | |||
144 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 144 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
145 | return -EIO; | 145 | return -EIO; |
146 | 146 | ||
147 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); | 147 | if (!id) |
148 | strlcpy(client->name, "cs53l32a", sizeof(client->name)); | ||
148 | 149 | ||
149 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 150 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
150 | client->addr << 1, client->adapter->name); | 151 | client->addr << 1, client->adapter->name); |
@@ -175,10 +176,17 @@ static int cs53l32a_probe(struct i2c_client *client, | |||
175 | return 0; | 176 | return 0; |
176 | } | 177 | } |
177 | 178 | ||
179 | static const struct i2c_device_id cs53l32a_id[] = { | ||
180 | { "cs53l32a", 0 }, | ||
181 | { } | ||
182 | }; | ||
183 | MODULE_DEVICE_TABLE(i2c, cs53l32a_id); | ||
184 | |||
178 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 185 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
179 | .name = "cs53l32a", | 186 | .name = "cs53l32a", |
180 | .driverid = I2C_DRIVERID_CS53L32A, | 187 | .driverid = I2C_DRIVERID_CS53L32A, |
181 | .command = cs53l32a_command, | 188 | .command = cs53l32a_command, |
182 | .probe = cs53l32a_probe, | 189 | .probe = cs53l32a_probe, |
190 | .id_table = cs53l32a_id, | ||
183 | }; | 191 | }; |
184 | 192 | ||
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index 4f08a4058d1..1d6c51a7531 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -74,7 +74,7 @@ static const u8 hw_bus[] = { | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* This array should match the CX18_HW_ defines */ | 76 | /* This array should match the CX18_HW_ defines */ |
77 | static const char * const hw_drivernames[] = { | 77 | static const char * const hw_devicenames[] = { |
78 | "tuner", | 78 | "tuner", |
79 | "tveeprom", | 79 | "tveeprom", |
80 | "cs5345", | 80 | "cs5345", |
@@ -95,8 +95,7 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) | |||
95 | id = hw_driverids[idx]; | 95 | id = hw_driverids[idx]; |
96 | bus = hw_bus[idx]; | 96 | bus = hw_bus[idx]; |
97 | memset(&info, 0, sizeof(info)); | 97 | memset(&info, 0, sizeof(info)); |
98 | strlcpy(info.driver_name, hw_drivernames[idx], | 98 | strlcpy(info.type, hw_devicenames[idx], sizeof(info.type)); |
99 | sizeof(info.driver_name)); | ||
100 | info.addr = hw_addrs[idx]; | 99 | info.addr = hw_addrs[idx]; |
101 | for (i = 0; i < I2C_CLIENTS_MAX; i++) | 100 | for (i = 0; i < I2C_CLIENTS_MAX; i++) |
102 | if (cx->i2c_clients[i] == NULL) | 101 | if (cx->i2c_clients[i] == NULL) |
@@ -279,7 +278,7 @@ static const char *cx18_i2c_id_name(u32 id) | |||
279 | 278 | ||
280 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) | 279 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) |
281 | if (hw_driverids[i] == id) | 280 | if (hw_driverids[i] == id) |
282 | return hw_drivernames[i]; | 281 | return hw_devicenames[i]; |
283 | return "unknown device"; | 282 | return "unknown device"; |
284 | } | 283 | } |
285 | 284 | ||
@@ -290,7 +289,7 @@ static const char *cx18_i2c_hw_name(u32 hw) | |||
290 | 289 | ||
291 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) | 290 | for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) |
292 | if (1 << i == hw) | 291 | if (1 << i == hw) |
293 | return hw_drivernames[i]; | 292 | return hw_devicenames[i]; |
294 | return "unknown device"; | 293 | return "unknown device"; |
295 | } | 294 | } |
296 | 295 | ||
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 88823810497..607efdcd22f 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -1284,10 +1284,17 @@ static int cx25840_remove(struct i2c_client *client) | |||
1284 | return 0; | 1284 | return 0; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | static const struct i2c_device_id cx25840_id[] = { | ||
1288 | { "cx25840", 0 }, | ||
1289 | { } | ||
1290 | }; | ||
1291 | MODULE_DEVICE_TABLE(i2c, cx25840_id); | ||
1292 | |||
1287 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 1293 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
1288 | .name = "cx25840", | 1294 | .name = "cx25840", |
1289 | .driverid = I2C_DRIVERID_CX25840, | 1295 | .driverid = I2C_DRIVERID_CX25840, |
1290 | .command = cx25840_command, | 1296 | .command = cx25840_command, |
1291 | .probe = cx25840_probe, | 1297 | .probe = cx25840_probe, |
1292 | .remove = cx25840_remove, | 1298 | .remove = cx25840_remove, |
1299 | .id_table = cx25840_id, | ||
1293 | }; | 1300 | }; |
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index 5e749c528a6..15d037ae25c 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
36 | #include <linux/page-flags.h> | 36 | #include <linux/page-flags.h> |
37 | #include <linux/byteorder/generic.h> | 37 | #include <asm/byteorder.h> |
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | 40 | ||
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 771adf47e94..32129f3ea83 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"); |
diff --git a/drivers/media/video/m52790.c b/drivers/media/video/m52790.c index 5b9dfa2c51b..8e0160d275c 100644 --- a/drivers/media/video/m52790.c +++ b/drivers/media/video/m52790.c | |||
@@ -135,8 +135,6 @@ static int m52790_probe(struct i2c_client *client, | |||
135 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 135 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
136 | return -EIO; | 136 | return -EIO; |
137 | 137 | ||
138 | snprintf(client->name, sizeof(client->name) - 1, "m52790"); | ||
139 | |||
140 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 138 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
141 | client->addr << 1, client->adapter->name); | 139 | client->addr << 1, client->adapter->name); |
142 | 140 | ||
@@ -159,11 +157,18 @@ static int m52790_remove(struct i2c_client *client) | |||
159 | 157 | ||
160 | /* ----------------------------------------------------------------------- */ | 158 | /* ----------------------------------------------------------------------- */ |
161 | 159 | ||
160 | static const struct i2c_device_id m52790_id[] = { | ||
161 | { "m52790", 0 }, | ||
162 | { } | ||
163 | }; | ||
164 | MODULE_DEVICE_TABLE(i2c, m52790_id); | ||
165 | |||
162 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 166 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
163 | .name = "m52790", | 167 | .name = "m52790", |
164 | .driverid = I2C_DRIVERID_M52790, | 168 | .driverid = I2C_DRIVERID_M52790, |
165 | .command = m52790_command, | 169 | .command = m52790_command, |
166 | .probe = m52790_probe, | 170 | .probe = m52790_probe, |
167 | .remove = m52790_remove, | 171 | .remove = m52790_remove, |
172 | .id_table = m52790_id, | ||
168 | }; | 173 | }; |
169 | 174 | ||
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index e6273162e12..310dbaba55f 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -815,7 +815,8 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
815 | int msp_product, msp_prod_hi, msp_prod_lo; | 815 | int msp_product, msp_prod_hi, msp_prod_lo; |
816 | int msp_rom; | 816 | int msp_rom; |
817 | 817 | ||
818 | snprintf(client->name, sizeof(client->name) - 1, "msp3400"); | 818 | if (!id) |
819 | strlcpy(client->name, "msp3400", sizeof(client->name)); | ||
819 | 820 | ||
820 | if (msp_reset(client) == -1) { | 821 | if (msp_reset(client) == -1) { |
821 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); | 822 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); |
@@ -864,9 +865,6 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
864 | msp_revision = (state->rev1 & 0x0f) + '@'; | 865 | msp_revision = (state->rev1 & 0x0f) + '@'; |
865 | msp_hard = ((state->rev1 >> 8) & 0xff) + '@'; | 866 | msp_hard = ((state->rev1 >> 8) & 0xff) + '@'; |
866 | msp_rom = state->rev2 & 0x1f; | 867 | msp_rom = state->rev2 & 0x1f; |
867 | snprintf(client->name, sizeof(client->name), "MSP%d4%02d%c-%c%d", | ||
868 | msp_family, msp_product, | ||
869 | msp_revision, msp_hard, msp_rom); | ||
870 | /* Rev B=2, C=3, D=4, G=7 */ | 868 | /* Rev B=2, C=3, D=4, G=7 */ |
871 | state->ident = msp_family * 10000 + 4000 + msp_product * 10 + | 869 | state->ident = msp_family * 10000 + 4000 + msp_product * 10 + |
872 | msp_revision - '@'; | 870 | msp_revision - '@'; |
@@ -931,7 +929,9 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
931 | } | 929 | } |
932 | 930 | ||
933 | /* hello world :-) */ | 931 | /* hello world :-) */ |
934 | v4l_info(client, "%s found @ 0x%x (%s)\n", client->name, | 932 | v4l_info(client, "MSP%d4%02d%c-%c%d found @ 0x%x (%s)\n", |
933 | msp_family, msp_product, | ||
934 | msp_revision, msp_hard, msp_rom, | ||
935 | client->addr << 1, client->adapter->name); | 935 | client->addr << 1, client->adapter->name); |
936 | v4l_info(client, "%s ", client->name); | 936 | v4l_info(client, "%s ", client->name); |
937 | if (state->has_nicam && state->has_radio) | 937 | if (state->has_nicam && state->has_radio) |
@@ -987,6 +987,12 @@ static int msp_remove(struct i2c_client *client) | |||
987 | 987 | ||
988 | /* ----------------------------------------------------------------------- */ | 988 | /* ----------------------------------------------------------------------- */ |
989 | 989 | ||
990 | static const struct i2c_device_id msp_id[] = { | ||
991 | { "msp3400", 0 }, | ||
992 | { } | ||
993 | }; | ||
994 | MODULE_DEVICE_TABLE(i2c, msp_id); | ||
995 | |||
990 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 996 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
991 | .name = "msp3400", | 997 | .name = "msp3400", |
992 | .driverid = I2C_DRIVERID_MSP3400, | 998 | .driverid = I2C_DRIVERID_MSP3400, |
@@ -995,6 +1001,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
995 | .remove = msp_remove, | 1001 | .remove = msp_remove, |
996 | .suspend = msp_suspend, | 1002 | .suspend = msp_suspend, |
997 | .resume = msp_resume, | 1003 | .resume = msp_resume, |
1004 | .id_table = msp_id, | ||
998 | }; | 1005 | }; |
999 | 1006 | ||
1000 | 1007 | ||
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index e684108637a..435c083cc54 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1456,14 +1456,13 @@ static int saa7115_probe(struct i2c_client *client, | |||
1456 | struct saa711x_state *state; | 1456 | struct saa711x_state *state; |
1457 | int i; | 1457 | int i; |
1458 | char name[17]; | 1458 | char name[17]; |
1459 | u8 chip_id; | 1459 | char chip_id; |
1460 | int autodetect = !id || id->driver_data == 1; | ||
1460 | 1461 | ||
1461 | /* Check if the adapter supports the needed features */ | 1462 | /* Check if the adapter supports the needed features */ |
1462 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 1463 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
1463 | return -EIO; | 1464 | return -EIO; |
1464 | 1465 | ||
1465 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | ||
1466 | |||
1467 | for (i = 0; i < 0x0f; i++) { | 1466 | for (i = 0; i < 0x0f; i++) { |
1468 | saa711x_write(client, 0, i); | 1467 | saa711x_write(client, 0, i); |
1469 | name[i] = (saa711x_read(client, 0) & 0x0f) + '0'; | 1468 | name[i] = (saa711x_read(client, 0) & 0x0f) + '0'; |
@@ -1472,8 +1471,7 @@ static int saa7115_probe(struct i2c_client *client, | |||
1472 | } | 1471 | } |
1473 | name[i] = '\0'; | 1472 | name[i] = '\0'; |
1474 | 1473 | ||
1475 | saa711x_write(client, 0, 5); | 1474 | chip_id = name[5]; |
1476 | chip_id = saa711x_read(client, 0) & 0x0f; | ||
1477 | 1475 | ||
1478 | /* Check whether this chip is part of the saa711x series */ | 1476 | /* Check whether this chip is part of the saa711x series */ |
1479 | if (memcmp(name, "1f711", 5)) { | 1477 | if (memcmp(name, "1f711", 5)) { |
@@ -1482,8 +1480,14 @@ static int saa7115_probe(struct i2c_client *client, | |||
1482 | return -ENODEV; | 1480 | return -ENODEV; |
1483 | } | 1481 | } |
1484 | 1482 | ||
1485 | snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); | 1483 | /* Safety check */ |
1486 | v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, client->addr << 1, client->adapter->name); | 1484 | if (!autodetect && id->name[6] != chip_id) { |
1485 | v4l_warn(client, "found saa711%c while %s was expected\n", | ||
1486 | chip_id, id->name); | ||
1487 | } | ||
1488 | snprintf(client->name, sizeof(client->name), "saa711%c", chip_id); | ||
1489 | v4l_info(client, "saa711%c found (%s) @ 0x%x (%s)\n", chip_id, name, | ||
1490 | client->addr << 1, client->adapter->name); | ||
1487 | 1491 | ||
1488 | state = kzalloc(sizeof(struct saa711x_state), GFP_KERNEL); | 1492 | state = kzalloc(sizeof(struct saa711x_state), GFP_KERNEL); |
1489 | i2c_set_clientdata(client, state); | 1493 | i2c_set_clientdata(client, state); |
@@ -1499,19 +1503,19 @@ static int saa7115_probe(struct i2c_client *client, | |||
1499 | state->hue = 0; | 1503 | state->hue = 0; |
1500 | state->sat = 64; | 1504 | state->sat = 64; |
1501 | switch (chip_id) { | 1505 | switch (chip_id) { |
1502 | case 1: | 1506 | case '1': |
1503 | state->ident = V4L2_IDENT_SAA7111; | 1507 | state->ident = V4L2_IDENT_SAA7111; |
1504 | break; | 1508 | break; |
1505 | case 3: | 1509 | case '3': |
1506 | state->ident = V4L2_IDENT_SAA7113; | 1510 | state->ident = V4L2_IDENT_SAA7113; |
1507 | break; | 1511 | break; |
1508 | case 4: | 1512 | case '4': |
1509 | state->ident = V4L2_IDENT_SAA7114; | 1513 | state->ident = V4L2_IDENT_SAA7114; |
1510 | break; | 1514 | break; |
1511 | case 5: | 1515 | case '5': |
1512 | state->ident = V4L2_IDENT_SAA7115; | 1516 | state->ident = V4L2_IDENT_SAA7115; |
1513 | break; | 1517 | break; |
1514 | case 8: | 1518 | case '8': |
1515 | state->ident = V4L2_IDENT_SAA7118; | 1519 | state->ident = V4L2_IDENT_SAA7118; |
1516 | break; | 1520 | break; |
1517 | default: | 1521 | default: |
@@ -1553,6 +1557,17 @@ static int saa7115_remove(struct i2c_client *client) | |||
1553 | return 0; | 1557 | return 0; |
1554 | } | 1558 | } |
1555 | 1559 | ||
1560 | static const struct i2c_device_id saa7115_id[] = { | ||
1561 | { "saa711x", 1 }, /* autodetect */ | ||
1562 | { "saa7111", 0 }, | ||
1563 | { "saa7113", 0 }, | ||
1564 | { "saa7114", 0 }, | ||
1565 | { "saa7115", 0 }, | ||
1566 | { "saa7118", 0 }, | ||
1567 | { } | ||
1568 | }; | ||
1569 | MODULE_DEVICE_TABLE(i2c, saa7115_id); | ||
1570 | |||
1556 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 1571 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
1557 | .name = "saa7115", | 1572 | .name = "saa7115", |
1558 | .driverid = I2C_DRIVERID_SAA711X, | 1573 | .driverid = I2C_DRIVERID_SAA711X, |
@@ -1560,5 +1575,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
1560 | .probe = saa7115_probe, | 1575 | .probe = saa7115_probe, |
1561 | .remove = saa7115_remove, | 1576 | .remove = saa7115_remove, |
1562 | .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, | 1577 | .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, |
1578 | .id_table = saa7115_id, | ||
1563 | }; | 1579 | }; |
1564 | 1580 | ||
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index e750cd65c1c..79d11a658bd 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -672,8 +672,6 @@ static int saa7127_probe(struct i2c_client *client, | |||
672 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 672 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
673 | return -EIO; | 673 | return -EIO; |
674 | 674 | ||
675 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); | ||
676 | |||
677 | v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n", | 675 | v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n", |
678 | client->addr << 1); | 676 | client->addr << 1); |
679 | 677 | ||
@@ -741,11 +739,18 @@ static int saa7127_remove(struct i2c_client *client) | |||
741 | 739 | ||
742 | /* ----------------------------------------------------------------------- */ | 740 | /* ----------------------------------------------------------------------- */ |
743 | 741 | ||
742 | static struct i2c_device_id saa7127_id[] = { | ||
743 | { "saa7127", 0 }, | ||
744 | { } | ||
745 | }; | ||
746 | MODULE_DEVICE_TABLE(i2c, saa7127_id); | ||
747 | |||
744 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 748 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
745 | .name = "saa7127", | 749 | .name = "saa7127", |
746 | .driverid = I2C_DRIVERID_SAA7127, | 750 | .driverid = I2C_DRIVERID_SAA7127, |
747 | .command = saa7127_command, | 751 | .command = saa7127_command, |
748 | .probe = saa7127_probe, | 752 | .probe = saa7127_probe, |
749 | .remove = saa7127_remove, | 753 | .remove = saa7127_remove, |
754 | .id_table = saa7127_id, | ||
750 | }; | 755 | }; |
751 | 756 | ||
diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c index 72c4081feff..2220f956994 100644 --- a/drivers/media/video/saa717x.c +++ b/drivers/media/video/saa717x.c | |||
@@ -1429,8 +1429,6 @@ static int saa717x_probe(struct i2c_client *client, | |||
1429 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 1429 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
1430 | return -EIO; | 1430 | return -EIO; |
1431 | 1431 | ||
1432 | snprintf(client->name, sizeof(client->name) - 1, "saa717x"); | ||
1433 | |||
1434 | if (saa717x_write(client, 0x5a4, 0xfe) && | 1432 | if (saa717x_write(client, 0x5a4, 0xfe) && |
1435 | saa717x_write(client, 0x5a5, 0x0f) && | 1433 | saa717x_write(client, 0x5a5, 0x0f) && |
1436 | saa717x_write(client, 0x5a6, 0x00) && | 1434 | saa717x_write(client, 0x5a6, 0x00) && |
@@ -1507,6 +1505,12 @@ static int saa717x_remove(struct i2c_client *client) | |||
1507 | 1505 | ||
1508 | /* ----------------------------------------------------------------------- */ | 1506 | /* ----------------------------------------------------------------------- */ |
1509 | 1507 | ||
1508 | static const struct i2c_device_id saa717x_id[] = { | ||
1509 | { "saa717x", 0 }, | ||
1510 | { } | ||
1511 | }; | ||
1512 | MODULE_DEVICE_TABLE(i2c, saa717x_id); | ||
1513 | |||
1510 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 1514 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
1511 | .name = "saa717x", | 1515 | .name = "saa717x", |
1512 | .driverid = I2C_DRIVERID_SAA717X, | 1516 | .driverid = I2C_DRIVERID_SAA717X, |
@@ -1514,4 +1518,5 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
1514 | .probe = saa717x_probe, | 1518 | .probe = saa717x_probe, |
1515 | .remove = saa717x_remove, | 1519 | .remove = saa717x_remove, |
1516 | .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, | 1520 | .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, |
1521 | .id_table = saa717x_id, | ||
1517 | }; | 1522 | }; |
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index 5748b1e1a12..7f9c7bcf3c8 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
36 | #include <linux/page-flags.h> | 36 | #include <linux/page-flags.h> |
37 | #include <linux/byteorder/generic.h> | 37 | #include <asm/byteorder.h> |
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | 40 | ||
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 5a75788b92a..a0f7bc1edaa 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -92,6 +92,7 @@ struct tuner { | |||
92 | unsigned int type; /* chip type id */ | 92 | unsigned int type; /* chip type id */ |
93 | unsigned int config; | 93 | unsigned int config; |
94 | int (*tuner_callback) (void *dev, int command, int arg); | 94 | int (*tuner_callback) (void *dev, int command, int arg); |
95 | const char *name; | ||
95 | }; | 96 | }; |
96 | 97 | ||
97 | /* standard i2c insmod options */ | 98 | /* standard i2c insmod options */ |
@@ -330,13 +331,13 @@ static void tuner_i2c_address_check(struct tuner *t) | |||
330 | tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n"); | 331 | tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n"); |
331 | tuner_warn("will soon be dropped. This message indicates that your\n"); | 332 | tuner_warn("will soon be dropped. This message indicates that your\n"); |
332 | tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n", | 333 | tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n", |
333 | t->i2c->name, t->i2c->addr); | 334 | t->name, t->i2c->addr); |
334 | tuner_warn("To ensure continued support for your device, please\n"); | 335 | tuner_warn("To ensure continued support for your device, please\n"); |
335 | tuner_warn("send a copy of this message, along with full dmesg\n"); | 336 | tuner_warn("send a copy of this message, along with full dmesg\n"); |
336 | tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n"); | 337 | tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n"); |
337 | tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n"); | 338 | tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n"); |
338 | tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n", | 339 | tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n", |
339 | t->i2c->adapter->name, t->i2c->addr, t->type, t->i2c->name); | 340 | t->i2c->adapter->name, t->i2c->addr, t->type, t->name); |
340 | tuner_warn("====================== WARNING! ======================\n"); | 341 | tuner_warn("====================== WARNING! ======================\n"); |
341 | } | 342 | } |
342 | 343 | ||
@@ -470,19 +471,17 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
470 | if ((NULL == analog_ops->set_params) && | 471 | if ((NULL == analog_ops->set_params) && |
471 | (fe_tuner_ops->set_analog_params)) { | 472 | (fe_tuner_ops->set_analog_params)) { |
472 | 473 | ||
473 | strlcpy(t->i2c->name, fe_tuner_ops->info.name, | 474 | t->name = fe_tuner_ops->info.name; |
474 | sizeof(t->i2c->name)); | ||
475 | 475 | ||
476 | t->fe.analog_demod_priv = t; | 476 | t->fe.analog_demod_priv = t; |
477 | memcpy(analog_ops, &tuner_core_ops, | 477 | memcpy(analog_ops, &tuner_core_ops, |
478 | sizeof(struct analog_demod_ops)); | 478 | sizeof(struct analog_demod_ops)); |
479 | 479 | ||
480 | } else { | 480 | } else { |
481 | strlcpy(t->i2c->name, analog_ops->info.name, | 481 | t->name = analog_ops->info.name; |
482 | sizeof(t->i2c->name)); | ||
483 | } | 482 | } |
484 | 483 | ||
485 | tuner_dbg("type set to %s\n", t->i2c->name); | 484 | tuner_dbg("type set to %s\n", t->name); |
486 | 485 | ||
487 | if (t->mode_mask == T_UNINITIALIZED) | 486 | if (t->mode_mask == T_UNINITIALIZED) |
488 | t->mode_mask = new_mode_mask; | 487 | t->mode_mask = new_mode_mask; |
@@ -1115,7 +1114,7 @@ static int tuner_probe(struct i2c_client *client, | |||
1115 | if (NULL == t) | 1114 | if (NULL == t) |
1116 | return -ENOMEM; | 1115 | return -ENOMEM; |
1117 | t->i2c = client; | 1116 | t->i2c = client; |
1118 | strlcpy(client->name, "(tuner unset)", sizeof(client->name)); | 1117 | t->name = "(tuner unset)"; |
1119 | i2c_set_clientdata(client, t); | 1118 | i2c_set_clientdata(client, t); |
1120 | t->type = UNSET; | 1119 | t->type = UNSET; |
1121 | t->audmode = V4L2_TUNER_MODE_STEREO; | 1120 | t->audmode = V4L2_TUNER_MODE_STEREO; |
@@ -1278,6 +1277,15 @@ static int tuner_remove(struct i2c_client *client) | |||
1278 | 1277 | ||
1279 | /* ----------------------------------------------------------------------- */ | 1278 | /* ----------------------------------------------------------------------- */ |
1280 | 1279 | ||
1280 | /* This driver supports many devices and the idea is to let the driver | ||
1281 | detect which device is present. So rather than listing all supported | ||
1282 | devices here, we pretend to support a single, fake device type. */ | ||
1283 | static const struct i2c_device_id tuner_id[] = { | ||
1284 | { "tuner", }, /* autodetect */ | ||
1285 | { } | ||
1286 | }; | ||
1287 | MODULE_DEVICE_TABLE(i2c, tuner_id); | ||
1288 | |||
1281 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 1289 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
1282 | .name = "tuner", | 1290 | .name = "tuner", |
1283 | .driverid = I2C_DRIVERID_TUNER, | 1291 | .driverid = I2C_DRIVERID_TUNER, |
@@ -1287,6 +1295,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
1287 | .suspend = tuner_suspend, | 1295 | .suspend = tuner_suspend, |
1288 | .resume = tuner_resume, | 1296 | .resume = tuner_resume, |
1289 | .legacy_probe = tuner_legacy_probe, | 1297 | .legacy_probe = tuner_legacy_probe, |
1298 | .id_table = tuner_id, | ||
1290 | }; | 1299 | }; |
1291 | 1300 | ||
1292 | 1301 | ||
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/video/upd64031a.c index 93bfd19dec7..b4628874933 100644 --- a/drivers/media/video/upd64031a.c +++ b/drivers/media/video/upd64031a.c | |||
@@ -228,6 +228,11 @@ static int upd64031a_remove(struct i2c_client *client) | |||
228 | 228 | ||
229 | /* ----------------------------------------------------------------------- */ | 229 | /* ----------------------------------------------------------------------- */ |
230 | 230 | ||
231 | static const struct i2c_device_id upd64031a_id[] = { | ||
232 | { "upd64031a", 0 }, | ||
233 | { } | ||
234 | }; | ||
235 | MODULE_DEVICE_TABLE(i2c, upd64031a_id); | ||
231 | 236 | ||
232 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 237 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
233 | .name = "upd64031a", | 238 | .name = "upd64031a", |
@@ -235,4 +240,5 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
235 | .command = upd64031a_command, | 240 | .command = upd64031a_command, |
236 | .probe = upd64031a_probe, | 241 | .probe = upd64031a_probe, |
237 | .remove = upd64031a_remove, | 242 | .remove = upd64031a_remove, |
243 | .id_table = upd64031a_id, | ||
238 | }; | 244 | }; |
diff --git a/drivers/media/video/upd64083.c b/drivers/media/video/upd64083.c index 9ab712a56ce..9521ce004dc 100644 --- a/drivers/media/video/upd64083.c +++ b/drivers/media/video/upd64083.c | |||
@@ -205,6 +205,11 @@ static int upd64083_remove(struct i2c_client *client) | |||
205 | 205 | ||
206 | /* ----------------------------------------------------------------------- */ | 206 | /* ----------------------------------------------------------------------- */ |
207 | 207 | ||
208 | static const struct i2c_device_id upd64083_id[] = { | ||
209 | { "upd64083", 0 }, | ||
210 | { } | ||
211 | }; | ||
212 | MODULE_DEVICE_TABLE(i2c, upd64083_id); | ||
208 | 213 | ||
209 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 214 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
210 | .name = "upd64083", | 215 | .name = "upd64083", |
@@ -212,4 +217,5 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
212 | .command = upd64083_command, | 217 | .command = upd64083_command, |
213 | .probe = upd64083_probe, | 218 | .probe = upd64083_probe, |
214 | .remove = upd64083_remove, | 219 | .remove = upd64083_remove, |
220 | .id_table = upd64083_id, | ||
215 | }; | 221 | }; |
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 982f4463896..0a88c44ace0 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c | |||
@@ -331,7 +331,7 @@ int videobuf_mmap_free(struct videobuf_queue *q) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | /* Locking: Caller holds q->vb_lock */ | 333 | /* Locking: Caller holds q->vb_lock */ |
334 | static int __videobuf_mmap_setup(struct videobuf_queue *q, | 334 | int __videobuf_mmap_setup(struct videobuf_queue *q, |
335 | unsigned int bcount, unsigned int bsize, | 335 | unsigned int bcount, unsigned int bsize, |
336 | enum v4l2_memory memory) | 336 | enum v4l2_memory memory) |
337 | { | 337 | { |
@@ -1129,6 +1129,7 @@ EXPORT_SYMBOL_GPL(videobuf_read_stream); | |||
1129 | EXPORT_SYMBOL_GPL(videobuf_read_one); | 1129 | EXPORT_SYMBOL_GPL(videobuf_read_one); |
1130 | EXPORT_SYMBOL_GPL(videobuf_poll_stream); | 1130 | EXPORT_SYMBOL_GPL(videobuf_poll_stream); |
1131 | 1131 | ||
1132 | EXPORT_SYMBOL_GPL(__videobuf_mmap_setup); | ||
1132 | EXPORT_SYMBOL_GPL(videobuf_mmap_setup); | 1133 | EXPORT_SYMBOL_GPL(videobuf_mmap_setup); |
1133 | EXPORT_SYMBOL_GPL(videobuf_mmap_free); | 1134 | EXPORT_SYMBOL_GPL(videobuf_mmap_free); |
1134 | EXPORT_SYMBOL_GPL(videobuf_mmap_mapper); | 1135 | EXPORT_SYMBOL_GPL(videobuf_mmap_mapper); |
diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/video/vp27smpx.c index fac0deba24a..a1f76ee032e 100644 --- a/drivers/media/video/vp27smpx.c +++ b/drivers/media/video/vp27smpx.c | |||
@@ -130,8 +130,6 @@ static int vp27smpx_probe(struct i2c_client *client, | |||
130 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 130 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
131 | return -EIO; | 131 | return -EIO; |
132 | 132 | ||
133 | snprintf(client->name, sizeof(client->name) - 1, "vp27smpx"); | ||
134 | |||
135 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 133 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
136 | client->addr << 1, client->adapter->name); | 134 | client->addr << 1, client->adapter->name); |
137 | 135 | ||
@@ -154,11 +152,18 @@ static int vp27smpx_remove(struct i2c_client *client) | |||
154 | 152 | ||
155 | /* ----------------------------------------------------------------------- */ | 153 | /* ----------------------------------------------------------------------- */ |
156 | 154 | ||
155 | static const struct i2c_device_id vp27smpx_id[] = { | ||
156 | { "vp27smpx", 0 }, | ||
157 | { } | ||
158 | }; | ||
159 | MODULE_DEVICE_TABLE(i2c, vp27smpx_id); | ||
160 | |||
157 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 161 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
158 | .name = "vp27smpx", | 162 | .name = "vp27smpx", |
159 | .driverid = I2C_DRIVERID_VP27SMPX, | 163 | .driverid = I2C_DRIVERID_VP27SMPX, |
160 | .command = vp27smpx_command, | 164 | .command = vp27smpx_command, |
161 | .probe = vp27smpx_probe, | 165 | .probe = vp27smpx_probe, |
162 | .remove = vp27smpx_remove, | 166 | .remove = vp27smpx_remove, |
167 | .id_table = vp27smpx_id, | ||
163 | }; | 168 | }; |
164 | 169 | ||
diff --git a/drivers/media/video/wm8739.c b/drivers/media/video/wm8739.c index 0f8ed8461fb..fc50299caa3 100644 --- a/drivers/media/video/wm8739.c +++ b/drivers/media/video/wm8739.c | |||
@@ -313,11 +313,18 @@ static int wm8739_remove(struct i2c_client *client) | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
316 | static const struct i2c_device_id wm8739_id[] = { | ||
317 | { "wm8739", 0 }, | ||
318 | { } | ||
319 | }; | ||
320 | MODULE_DEVICE_TABLE(i2c, wm8739_id); | ||
321 | |||
316 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 322 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
317 | .name = "wm8739", | 323 | .name = "wm8739", |
318 | .driverid = I2C_DRIVERID_WM8739, | 324 | .driverid = I2C_DRIVERID_WM8739, |
319 | .command = wm8739_command, | 325 | .command = wm8739_command, |
320 | .probe = wm8739_probe, | 326 | .probe = wm8739_probe, |
321 | .remove = wm8739_remove, | 327 | .remove = wm8739_remove, |
328 | .id_table = wm8739_id, | ||
322 | }; | 329 | }; |
323 | 330 | ||
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index 67a409e60c4..506378a508b 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -216,11 +216,18 @@ static int wm8775_remove(struct i2c_client *client) | |||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | static const struct i2c_device_id wm8775_id[] = { | ||
220 | { "wm8775", 0 }, | ||
221 | { } | ||
222 | }; | ||
223 | MODULE_DEVICE_TABLE(i2c, wm8775_id); | ||
224 | |||
219 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 225 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
220 | .name = "wm8775", | 226 | .name = "wm8775", |
221 | .driverid = I2C_DRIVERID_WM8775, | 227 | .driverid = I2C_DRIVERID_WM8775, |
222 | .command = wm8775_command, | 228 | .command = wm8775_command, |
223 | .probe = wm8775_probe, | 229 | .probe = wm8775_probe, |
224 | .remove = wm8775_remove, | 230 | .remove = wm8775_remove, |
231 | .id_table = wm8775_id, | ||
225 | }; | 232 | }; |
226 | 233 | ||
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 363dd2b9475..e5c4e9f5193 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
40 | #include <linux/page-flags.h> | 40 | #include <linux/page-flags.h> |
41 | #include <linux/byteorder/generic.h> | 41 | #include <asm/byteorder.h> |
42 | #include <asm/page.h> | 42 | #include <asm/page.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | 44 | ||
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index 7b60533efe4..37629ffd34c 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
34 | #include <linux/byteorder/generic.h> | ||
35 | 34 | ||
36 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
37 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
@@ -47,6 +46,7 @@ | |||
47 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
48 | #include <linux/wait.h> | 47 | #include <linux/wait.h> |
49 | 48 | ||
49 | #include <asm/byteorder.h> | ||
50 | #include <asm/io.h> | 50 | #include <asm/io.h> |
51 | 51 | ||
52 | #include "videocodec.h" | 52 | #include "videocodec.h" |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 0134bec1e39..345c77e4683 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/vmalloc.h> | 53 | #include <linux/vmalloc.h> |
54 | #include <linux/wait.h> | 54 | #include <linux/wait.h> |
55 | #include <linux/byteorder/generic.h> | ||
56 | 55 | ||
57 | #include <linux/interrupt.h> | 56 | #include <linux/interrupt.h> |
58 | #include <linux/i2c.h> | 57 | #include <linux/i2c.h> |
@@ -74,6 +73,7 @@ | |||
74 | #include <media/v4l2-common.h> | 73 | #include <media/v4l2-common.h> |
75 | #include "videocodec.h" | 74 | #include "videocodec.h" |
76 | 75 | ||
76 | #include <asm/byteorder.h> | ||
77 | #include <asm/io.h> | 77 | #include <asm/io.h> |
78 | #include <asm/uaccess.h> | 78 | #include <asm/uaccess.h> |
79 | #include <linux/proc_fs.h> | 79 | #include <linux/proc_fs.h> |