aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c40
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)
1227static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; } 1226static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; }
1228static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } 1227static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }
1229 1228
1230static 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
1242static void tda8425_setmode(struct CHIPSTATE *chip, int mode) 1229static 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};
2080MODULE_DEVICE_TABLE(i2c, tvaudio_id); 2066MODULE_DEVICE_TABLE(i2c, tvaudio_id);
2081 2067
2082static struct v4l2_i2c_driver_data v4l2_i2c_data = { 2068static 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
2078static __init int init_tvaudio(void)
2079{
2080 return i2c_add_driver(&tvaudio_driver);
2081}
2082
2083static __exit void exit_tvaudio(void)
2084{
2085 i2c_del_driver(&tvaudio_driver);
2086}
2087
2088module_init(init_tvaudio);
2089module_exit(exit_tvaudio);