diff options
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r-- | drivers/media/video/tvaudio.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 800fc1b111ef..a25e2b5e1944 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <media/tvaudio.h> | 35 | #include <media/tvaudio.h> |
36 | #include <media/v4l2-device.h> | 36 | #include <media/v4l2-device.h> |
37 | #include <media/v4l2-chip-ident.h> | 37 | #include <media/v4l2-chip-ident.h> |
38 | #include <media/v4l2-i2c-drv.h> | ||
39 | 38 | ||
40 | #include <media/i2c-addr.h> | 39 | #include <media/i2c-addr.h> |
41 | 40 | ||
@@ -1227,18 +1226,6 @@ static int tea6320_initialize(struct CHIPSTATE * chip) | |||
1227 | static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; } | 1226 | static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; } |
1228 | static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } | 1227 | static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } |
1229 | 1228 | ||
1230 | static int tda8425_initialize(struct CHIPSTATE *chip) | ||
1231 | { | ||
1232 | struct CHIPDESC *desc = chip->desc; | ||
1233 | struct i2c_client *c = v4l2_get_subdevdata(&chip->sd); | ||
1234 | int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1, | ||
1235 | /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF}; | ||
1236 | |||
1237 | if (c->adapter->id == I2C_HW_B_RIVA) | ||
1238 | memcpy(desc->inputmap, inputmap, sizeof(inputmap)); | ||
1239 | return 0; | ||
1240 | } | ||
1241 | |||
1242 | static void tda8425_setmode(struct CHIPSTATE *chip, int mode) | 1229 | static void tda8425_setmode(struct CHIPSTATE *chip, int mode) |
1243 | { | 1230 | { |
1244 | int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1; | 1231 | int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1; |
@@ -1574,7 +1561,6 @@ static struct CHIPDESC chiplist[] = { | |||
1574 | .treblereg = TDA8425_TR, | 1561 | .treblereg = TDA8425_TR, |
1575 | 1562 | ||
1576 | /* callbacks */ | 1563 | /* callbacks */ |
1577 | .initialize = tda8425_initialize, | ||
1578 | .volfunc = tda8425_shift10, | 1564 | .volfunc = tda8425_shift10, |
1579 | .bassfunc = tda8425_shift12, | 1565 | .bassfunc = tda8425_shift12, |
1580 | .treblefunc = tda8425_shift12, | 1566 | .treblefunc = tda8425_shift12, |
@@ -2079,9 +2065,25 @@ static const struct i2c_device_id tvaudio_id[] = { | |||
2079 | }; | 2065 | }; |
2080 | MODULE_DEVICE_TABLE(i2c, tvaudio_id); | 2066 | MODULE_DEVICE_TABLE(i2c, tvaudio_id); |
2081 | 2067 | ||
2082 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 2068 | static struct i2c_driver tvaudio_driver = { |
2083 | .name = "tvaudio", | 2069 | .driver = { |
2084 | .probe = tvaudio_probe, | 2070 | .owner = THIS_MODULE, |
2085 | .remove = tvaudio_remove, | 2071 | .name = "tvaudio", |
2086 | .id_table = tvaudio_id, | 2072 | }, |
2073 | .probe = tvaudio_probe, | ||
2074 | .remove = tvaudio_remove, | ||
2075 | .id_table = tvaudio_id, | ||
2087 | }; | 2076 | }; |
2077 | |||
2078 | static __init int init_tvaudio(void) | ||
2079 | { | ||
2080 | return i2c_add_driver(&tvaudio_driver); | ||
2081 | } | ||
2082 | |||
2083 | static __exit void exit_tvaudio(void) | ||
2084 | { | ||
2085 | i2c_del_driver(&tvaudio_driver); | ||
2086 | } | ||
2087 | |||
2088 | module_init(init_tvaudio); | ||
2089 | module_exit(exit_tvaudio); | ||