]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tuner-core.c
V4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed
[linux-2.6-omap-h63xx.git] / drivers / media / video / tuner-core.c
index 578414efdb1a75c156347c0531b4c51f582a095c..c8cd718675abf30c67ca7972e2b6155d750a95f7 100644 (file)
 #define PREFIX t->i2c->driver->driver.name
 
 /** This macro allows us to probe dynamically, avoiding static links */
-#ifdef CONFIG_DVB_CORE_ATTACH
+#ifdef CONFIG_MEDIA_ATTACH
 #define tuner_symbol_probe(FUNCTION, ARGS...) ({ \
        int __r = -EINVAL; \
        typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
        if (__a) { \
                __r = (int) __a(ARGS); \
+               symbol_put(FUNCTION); \
        } else { \
                printk(KERN_ERR "TUNER: Unable to find " \
                                "symbol "#FUNCTION"()\n"); \
        } \
-       symbol_put(FUNCTION); \
        __r; \
 })
 
@@ -1106,7 +1106,8 @@ static void tuner_lookup(struct i2c_adapter *adap,
 /* During client attach, set_type is called by adapter's attach_inform callback.
    set_type must then be completed by tuner_probe.
  */
-static int tuner_probe(struct i2c_client *client)
+static int tuner_probe(struct i2c_client *client,
+                      const struct i2c_device_id *id)
 {
        struct tuner *t;
        struct tuner *radio;