V4L/DVB (3108): tveeprom cleanup of hardcoded tuner format values.
[pandora-kernel.git] / drivers / media / video / tveeprom.c
index 3a986c2..a26ce75 100644 (file)
@@ -63,10 +63,10 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
                printk(KERN_INFO "tveeprom %d-%04x: " fmt, \
                        c->adapter->nr, c->addr , ##arg); } while (0)
 
-
-/* ----------------------------------------------------------------------- */
-/* some hauppauge specific stuff                                           */
-
+/*
+ * The Hauppauge eeprom uses an 8bit field to determine which
+ * tuner formats the tuner supports.
+ */
 static struct HAUPPAUGE_TUNER_FMT
 {
        int     id;
@@ -74,14 +74,14 @@ static struct HAUPPAUGE_TUNER_FMT
 }
 hauppauge_tuner_fmt[] =
 {
-       { 0x00000000, " unknown1" },
-       { 0x00000000, " unknown2" },
-       { 0x00000007, " PAL(B/G)" },
-       { 0x00001000, " NTSC(M)" },
-       { 0x00000010, " PAL(I)" },
-       { 0x00400000, " SECAM(L/L')" },
-       { 0x00000e00, " PAL(D/K)" },
-       { 0x03000000, " ATSC/DVB Digital" },
+       { V4L2_STD_UNKNOWN," UNKNOWN" },
+       { V4L2_STD_UNKNOWN," FM" },
+       { V4L2_STD_PAL_BG, " PAL(B/G)" },
+       { V4L2_STD_NTSC_M, " NTSC(M)" },
+       { V4L2_STD_PAL_I,  " PAL(I)" },
+       { V4L2_STD_SECAM_L," SECAM(L/L')" },
+       { V4L2_STD_PAL_DK, " PAL(D/D1/K)" },
+       { V4L2_STD_ATSC,   " ATSC/DVB Digital" },
 };
 
 /* This is the full list of possible tuners. Many thanks to Hauppauge for
@@ -206,10 +206,10 @@ hauppauge_tuner[] =
        { TUNER_ABSENT,        "TCL 2002MI_3H"},
        { TUNER_TCL_2002N,     "TCL 2002N 5H"},
        /* 100-109 */
-       { TUNER_ABSENT,        "Philips FMD1216ME"},
+       { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"},
        { TUNER_TEA5767,       "Philips TEA5768HL FM Radio"},
        { TUNER_ABSENT,        "Panasonic ENV57H12D5"},
-       { TUNER_ABSENT,        "TCL MFNM05-4"},
+       { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"},
        { TUNER_ABSENT,        "TCL MNM05-4"},
        { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"},
        { TUNER_ABSENT,        "TCL MQNM05-4"},
@@ -751,9 +751,9 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
        client->addr = address;
        client->adapter = adapter;
        client->driver = &i2c_driver_tveeprom;
-       client->flags = I2C_CLIENT_ALLOW_USE;
        snprintf(client->name, sizeof(client->name), "tveeprom");
-        i2c_attach_client(client);
+       i2c_attach_client(client);
+
        return 0;
 }
 
@@ -778,10 +778,10 @@ tveeprom_detach_client (struct i2c_client *client)
 }
 
 static struct i2c_driver i2c_driver_tveeprom = {
-       .owner          = THIS_MODULE,
-       .name           = "tveeprom",
+       .driver = {
+               .name   = "tveeprom",
+       },
        .id             = I2C_DRIVERID_TVEEPROM,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = tveeprom_attach_adapter,
        .detach_client  = tveeprom_detach_client,
        .command        = tveeprom_command,